From 136e054cf0f22df6d461b0229635e43b4160667b Mon Sep 17 00:00:00 2001 From: Dev Date: Sat, 18 May 2024 21:18:13 +0100 Subject: [PATCH] Updated types --- .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../10ScopesAndTypes/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts} | 2 +- .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings}/BotAmount.d.ts | 1 + .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts} | 2 +- .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings}/BotAmount.d.ts | 1 + .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts} | 2 +- .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings}/BotAmount.d.ts | 1 + .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- TypeScript/13AddTrader/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../13AddTrader/types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../13AddTrader/types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ ...ata.d.ts => IMatchGroupStatusRequest.d.ts} | 2 +- .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../enums/{ => RaidSettings}/BotAmount.d.ts | 1 + .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../13AddTrader/types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../13AddTrader/types/utils/JsonUtil.d.ts | 1 + .../13AddTrader/types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../14AfterDBLoadHook/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../16ImporterUtil/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../16ImporterUtil/types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../18CustomItemService/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ TypeScript/1LogToConsole/package.json | 2 +- .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- TypeScript/1LogToConsole/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../1LogToConsole/types/utils/JsonUtil.d.ts | 1 + .../1LogToConsole/types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../20CustomChatBot/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../20CustomChatBot/types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../22CustomAkiCommand/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- TypeScript/2EditDatabase/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../2EditDatabase/types/utils/JsonUtil.d.ts | 1 + .../2EditDatabase/types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../3GetSptConfigFile/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../5ReplaceMethod/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../5ReplaceMethod/types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- .../types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../types/utils/JsonUtil.d.ts | 1 + .../types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- TypeScript/7OnLoadHook/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../7OnLoadHook/types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../7OnLoadHook/types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../7OnLoadHook/types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../7OnLoadHook/types/utils/JsonUtil.d.ts | 1 + .../7OnLoadHook/types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- TypeScript/8OnUpdateHook/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../8OnUpdateHook/types/utils/JsonUtil.d.ts | 1 + .../8OnUpdateHook/types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ .../types/callbacks/BotCallbacks.d.ts | 2 +- .../types/callbacks/DialogueCallbacks.d.ts | 8 +++ .../types/callbacks/GameCallbacks.d.ts | 7 ++ .../types/callbacks/ItemEventCallbacks.d.ts | 2 +- .../types/callbacks/MatchCallbacks.d.ts | 50 +++++++------- .../types/callbacks/RagfairCallbacks.d.ts | 4 +- .../types/controllers/BotController.d.ts | 49 ++++++++++++-- .../types/controllers/BuildController.d.ts | 6 +- .../types/controllers/DialogueController.d.ts | 4 ++ .../types/controllers/GameController.d.ts | 11 +++- .../types/controllers/HealthController.d.ts | 6 +- .../types/controllers/HideoutController.d.ts | 6 +- .../types/controllers/InraidController.d.ts | 4 +- .../controllers/InsuranceController.d.ts | 6 +- .../controllers/InventoryController.d.ts | 6 +- .../types/controllers/LocationController.d.ts | 6 +- .../types/controllers/MatchController.d.ts | 12 ++-- .../types/controllers/QuestController.d.ts | 6 +- .../RepeatableQuestController.d.ts | 6 +- .../types/controllers/TradeController.d.ts | 4 +- .../types/controllers/TraderController.d.ts | 6 +- TypeScript/9RouterHooks/types/di/Router.d.ts | 10 +-- .../generators/BotEquipmentModGenerator.d.ts | 8 +-- .../types/generators/BotGenerator.d.ts | 6 +- .../types/generators/BotLevelGenerator.d.ts | 25 +++---- .../types/generators/BotLootGenerator.d.ts | 6 +- .../types/generators/BotWeaponGenerator.d.ts | 6 +- .../generators/FenceBaseAssortGenerator.d.ts | 4 +- .../types/generators/LocationGenerator.d.ts | 9 ++- .../types/generators/LootGenerator.d.ts | 4 +- .../types/generators/PlayerScavGenerator.d.ts | 6 +- .../generators/RagfairAssortGenerator.d.ts | 4 +- .../generators/RagfairOfferGenerator.d.ts | 6 +- .../generators/RepeatableQuestGenerator.d.ts | 6 +- .../RepeatableQuestRewardGenerator.d.ts | 6 +- .../generators/ScavCaseRewardGenerator.d.ts | 4 +- .../types/generators/WeatherGenerator.d.ts | 4 +- .../types/helpers/BotDifficultyHelper.d.ts | 6 +- .../9RouterHooks/types/helpers/BotHelper.d.ts | 4 +- .../GiveCommand/GiveSptCommand.d.ts | 7 +- .../ProfileCommand/ProfileSptCommand.d.ts | 4 +- .../TraderCommand/TraderSptCommand.d.ts | 4 +- .../types/helpers/HandbookHelper.d.ts | 6 +- .../types/helpers/HealthHelper.d.ts | 6 +- .../types/helpers/HideoutHelper.d.ts | 6 +- .../types/helpers/InRaidHelper.d.ts | 6 +- .../types/helpers/InventoryHelper.d.ts | 6 +- .../types/helpers/ItemHelper.d.ts | 9 ++- .../types/helpers/NotificationSendHelper.d.ts | 10 +-- .../types/helpers/NotifierHelper.d.ts | 12 ++-- .../types/helpers/PresetHelper.d.ts | 6 +- .../types/helpers/ProfileHelper.d.ts | 6 +- .../types/helpers/QuestHelper.d.ts | 6 +- .../types/helpers/RagfairHelper.d.ts | 6 +- .../types/helpers/RagfairServerHelper.d.ts | 6 +- .../types/helpers/RepairHelper.d.ts | 6 +- .../types/helpers/RepeatableQuestHelper.d.ts | 6 +- .../types/helpers/TradeHelper.d.ts | 6 +- .../types/helpers/TraderAssortHelper.d.ts | 6 +- .../types/loaders/BundleLoader.d.ts | 4 +- .../types/models/eft/common/IGlobals.d.ts | 65 ++++++++++++++++++- .../types/models/eft/common/ILocation.d.ts | 63 ++++++++++++++++++ .../models/eft/common/ILocationBase.d.ts | 4 ++ .../models/eft/common/tables/IBotBase.d.ts | 3 + .../models/eft/common/tables/ILootBase.d.ts | 59 ----------------- .../eft/common/tables/ITemplateItem.d.ts | 4 +- .../eft/dialog/IAddUserGroupMailRequest.d.ts | 4 ++ .../dialog/IChangeGroupMailOwnerRequest.d.ts | 4 ++ .../eft/dialog/ICreateGroupMailRequest.d.ts | 4 ++ .../dialog/IRemoveUserGroupMailRequest.d.ts | 4 ++ .../models/eft/game/IGameModeRequestData.d.ts | 3 + .../models/eft/game/IGameModeResponse.d.ts | 8 +++ .../models/eft/game/ISendReportRequest.d.ts | 4 ++ .../eft/match/IAcceptGroupInviteRequest.d.ts | 3 - .../eft/match/IAcceptGroupInviteResponse.d.ts | 16 ----- .../eft/match/ICancelGroupInviteRequest.d.ts | 3 - .../eft/match/ICreateGroupRequestData.d.ts | 6 -- .../eft/match/IDeclineGroupInviteRequest.d.ts | 2 - .../eft/match/IGetGroupStatusRequestData.d.ts | 9 --- .../eft/match/IGetGroupStatusResponse.d.ts | 19 ------ .../eft/match/IGetProfileRequestData.d.ts | 3 - .../IGetRaidConfigurationRequestData.d.ts | 32 +-------- .../models/eft/match/IGroupCharacter.d.ts | 39 +++++++++++ .../eft/match/IJoinMatchRequestData.d.ts | 9 --- .../models/eft/match/IJoinMatchResult.d.ts | 18 ----- .../eft/match/IMatchGroupCurrentResponse.d.ts | 4 ++ .../match/IMatchGroupInviteSendRequest.d.ts | 4 ++ .../match/IMatchGroupPlayerRemoveRequest.d.ts | 3 + .../match/IMatchGroupStartGameRequest.d.ts | 5 ++ .../eft/match/IMatchGroupStatusRequest.d.ts | 9 +++ .../eft/match/IMatchGroupStatusResponse.d.ts | 5 ++ .../eft/match/IMatchGroupTransferRequest.d.ts | 3 + .../eft/match/IProfileStatusRequest.d.ts | 3 + .../eft/match/IProfileStatusResponse.d.ts | 5 ++ .../types/models/eft/match/IRaidSettings.d.ts | 42 ++++++++++++ .../match/IRemovePlayerFromGroupRequest.d.ts | 3 - .../models/eft/match/IRequestIdRequest.d.ts | 3 + .../eft/match/ISendGroupInviteRequest.d.ts | 4 -- .../types/models/eft/match/IServer.d.ts | 5 ++ .../models/eft/match/ISessionStatus.d.ts | 14 ++++ .../eft/match/ITransferGroupRequest.d.ts | 3 - .../types/models/eft/notifier/INotifier.d.ts | 17 ----- .../types/models/eft/profile/IAkiProfile.d.ts | 8 +++ .../models/eft/weather/IWeatherData.d.ts | 5 +- .../types/models/eft/ws/IWsAid.d.ts | 4 ++ .../types/models/eft/ws/IWsAidNickname.d.ts | 5 ++ .../models/eft/ws/IWsChatMessageReceived.d.ts | 8 +++ .../types/models/eft/ws/IWsGroupId.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteAccept.d.ts | 4 ++ .../eft/ws/IWsGroupMatchInviteDecline.d.ts | 5 ++ .../eft/ws/IWsGroupMatchInviteSend.d.ts | 7 ++ .../eft/ws/IWsGroupMatchLeaderChanged.d.ts | 4 ++ .../models/eft/ws/IWsGroupMatchRaidReady.d.ts | 5 ++ .../eft/ws/IWsGroupMatchRaidSettings.d.ts | 5 ++ .../models/eft/ws/IWsNotificationEvent.d.ts | 4 ++ .../types/models/eft/ws/IWsPing.d.ts | 3 + .../models/eft/ws/IWsRagfairOfferSold.d.ts | 6 ++ .../types/models/eft/ws/IWsUserConfirmed.d.ts | 17 +++++ .../types/models/enums/BotAmount.d.ts | 7 -- .../types/models/enums/DateTime.d.ts | 4 ++ .../models/enums/NotificationEventType.d.ts | 28 ++++++++ .../types/models/enums/PlayersSpawnPlace.d.ts | 5 ++ .../types/models/enums/ProfileStatus.d.ts | 7 ++ .../types/models/enums/QuestRewardType.d.ts | 3 +- .../models/enums/RaidSettings/BotAmount.d.ts | 8 +++ .../{ => RaidSettings}/BotDifficulty.d.ts | 0 .../TimeAndWeather/CloudinessType.d.ts | 8 +++ .../RaidSettings/TimeAndWeather/FogType.d.ts | 7 ++ .../RaidSettings/TimeAndWeather/RainType.d.ts | 7 ++ .../TimeAndWeather/TimeFlowType.d.ts | 10 +++ .../TimeAndWeather/WindSpeed.d.ts | 7 ++ .../types/models/enums/Season.d.ts | 7 ++ .../types/models/enums/SideType.d.ts | 5 ++ .../models/enums/WildSpawnTypeNumber.d.ts | 10 ++- .../models/spt/bots/BotGenerationDetails.d.ts | 3 + .../types/models/spt/config/IPmcConfig.d.ts | 1 + .../models/spt/config/IWeatherConfig.d.ts | 12 +++- .../spt/generators/ILocationGenerator.d.ts | 2 +- .../models/spt/server/ExhaustableArray.d.ts | 6 +- .../models/spt/server/IDatabaseTables.d.ts | 2 - .../types/models/spt/server/ILocations.d.ts | 1 + .../types/routers/EventOutputHolder.d.ts | 6 +- .../types/routers/HttpRouter.d.ts | 4 +- .../types/routers/ItemEventRouter.d.ts | 8 +-- .../CustomizationItemEventRouter.d.ts | 2 +- .../item_events/HealthItemEventRouter.d.ts | 2 +- .../item_events/HideoutItemEventRouter.d.ts | 2 +- .../item_events/InsuranceItemEventRouter.d.ts | 2 +- .../item_events/InventoryItemEventRouter.d.ts | 2 +- .../item_events/NoteItemEventRouter.d.ts | 2 +- .../item_events/QuestItemEventRouter.d.ts | 2 +- .../item_events/RagfairItemEventRouter.d.ts | 2 +- .../item_events/RepairItemEventRouter.d.ts | 2 +- .../item_events/TradeItemEventRouter.d.ts | 2 +- .../item_events/WishlistItemEventRouter.d.ts | 2 +- .../types/servers/WebSocketServer.d.ts | 27 +++----- .../types/servers/http/AkiHttpListener.d.ts | 4 +- .../types/servers/http/IHttpListener.d.ts | 2 +- .../ws/AkiWebSocketConnectionHandler.d.ts | 31 +++++++++ .../ws/IWebSocketConnectionHandler.d.ts | 8 +++ .../DefaultAkiWebSocketMessageHandler.d.ts | 8 +++ .../message/IAkiWebSocketMessageHandler.d.ts | 4 ++ .../services/BotGenerationCacheService.d.ts | 4 +- .../types/services/BotLootCacheService.d.ts | 6 +- .../services/CustomLocationWaveService.d.ts | 4 +- .../types/services/FenceService.d.ts | 6 +- .../types/services/InsuranceService.d.ts | 6 +- .../types/services/LocaleService.d.ts | 5 ++ .../types/services/NotificationService.d.ts | 4 +- .../types/services/OpenZoneService.d.ts | 4 +- .../types/services/ProfileFixerService.d.ts | 4 +- .../services/ProfileSnapshotService.d.ts | 6 +- .../types/services/SeasonalEventService.d.ts | 2 + .../types/services/TraderServicesService.d.ts | 6 +- .../types/services/mod/CustomItemService.d.ts | 6 +- .../mod/httpListener/HttpListenerMod.d.ts | 2 +- .../9RouterHooks/types/utils/JsonUtil.d.ts | 1 + .../9RouterHooks/types/utils/RandomUtil.d.ts | 10 +-- .../types/utils/cloners/ICloner.d.ts | 3 + .../types/utils/cloners/JsonCloner.d.ts | 4 ++ .../types/utils/cloners/RecursiveCloner.d.ts | 5 ++ .../types/utils/cloners/StructuredCloner.d.ts | 4 ++ 4361 files changed, 22429 insertions(+), 12229 deletions(-) delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStartGameRequest.d.ts rename TypeScript/{12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusRequestData.d.ts => 10ScopesAndTypes/types/models/eft/match/IMatchGroupStatusRequest.d.ts} (80%) create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsUserConfirmed.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/ProfileStatus.d.ts rename TypeScript/{12ClassExtensionOverride/types/models/enums => 10ScopesAndTypes/types/models/enums/RaidSettings}/BotAmount.d.ts (85%) rename TypeScript/10ScopesAndTypes/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/Season.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/models/enums/SideType.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/10ScopesAndTypes/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStartGameRequest.d.ts rename TypeScript/{10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts => 11BundleLoadingSample/types/models/eft/match/IMatchGroupStatusRequest.d.ts} (80%) create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsUserConfirmed.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/ProfileStatus.d.ts rename TypeScript/{10ScopesAndTypes/types/models/enums => 11BundleLoadingSample/types/models/enums/RaidSettings}/BotAmount.d.ts (85%) rename TypeScript/11BundleLoadingSample/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/Season.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/models/enums/SideType.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/11BundleLoadingSample/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStartGameRequest.d.ts rename TypeScript/{11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts => 12ClassExtensionOverride/types/models/eft/match/IMatchGroupStatusRequest.d.ts} (80%) create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsUserConfirmed.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/ProfileStatus.d.ts rename TypeScript/{11BundleLoadingSample/types/models/enums => 12ClassExtensionOverride/types/models/enums/RaidSettings}/BotAmount.d.ts (85%) rename TypeScript/12ClassExtensionOverride/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/Season.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/models/enums/SideType.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/12ClassExtensionOverride/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStartGameRequest.d.ts rename TypeScript/13AddTrader/types/models/eft/match/{IGetGroupStatusRequestData.d.ts => IMatchGroupStatusRequest.d.ts} (80%) create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/13AddTrader/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/13AddTrader/types/models/eft/ws/IWsUserConfirmed.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/ProfileStatus.d.ts rename TypeScript/13AddTrader/types/models/enums/{ => RaidSettings}/BotAmount.d.ts (85%) rename TypeScript/13AddTrader/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/Season.d.ts create mode 100644 TypeScript/13AddTrader/types/models/enums/SideType.d.ts create mode 100644 TypeScript/13AddTrader/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/13AddTrader/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/13AddTrader/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/13AddTrader/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/13AddTrader/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/13AddTrader/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/13AddTrader/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/13AddTrader/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/14AfterDBLoadHook/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/Season.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/models/enums/SideType.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/14AfterDBLoadHook/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/15HttpListenerExample/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/15HttpListenerExample/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/Season.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/models/enums/SideType.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/15HttpListenerExample/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/16ImporterUtil/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/16ImporterUtil/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/Season.d.ts create mode 100644 TypeScript/16ImporterUtil/types/models/enums/SideType.d.ts create mode 100644 TypeScript/16ImporterUtil/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/16ImporterUtil/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/16ImporterUtil/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/16ImporterUtil/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/16ImporterUtil/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/16ImporterUtil/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/16ImporterUtil/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/16ImporterUtil/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/17AsyncImporterWithDependency1/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/Season.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/models/enums/SideType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/17AsyncImporterWithDependency2/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/Season.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/models/enums/SideType.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/18CustomItemService/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/18CustomItemService/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/Season.d.ts create mode 100644 TypeScript/18CustomItemService/types/models/enums/SideType.d.ts create mode 100644 TypeScript/18CustomItemService/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/18CustomItemService/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/18CustomItemService/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/18CustomItemService/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/18CustomItemService/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/18CustomItemService/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/18CustomItemService/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/18CustomItemService/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/19UseExternalLibraries/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/Season.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/models/enums/SideType.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/19UseExternalLibraries/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/1LogToConsole/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/1LogToConsole/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/Season.d.ts create mode 100644 TypeScript/1LogToConsole/types/models/enums/SideType.d.ts create mode 100644 TypeScript/1LogToConsole/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/1LogToConsole/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/1LogToConsole/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/1LogToConsole/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/1LogToConsole/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/1LogToConsole/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/1LogToConsole/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/1LogToConsole/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/20CustomChatBot/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/20CustomChatBot/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/Season.d.ts create mode 100644 TypeScript/20CustomChatBot/types/models/enums/SideType.d.ts create mode 100644 TypeScript/20CustomChatBot/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/20CustomChatBot/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/20CustomChatBot/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/20CustomChatBot/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/20CustomChatBot/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/20CustomChatBot/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/20CustomChatBot/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/20CustomChatBot/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/21CustomCommandoCommand/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/Season.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/models/enums/SideType.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/21CustomCommandoCommand/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/22CustomAkiCommand/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/Season.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/models/enums/SideType.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/22CustomAkiCommand/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/2EditDatabase/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/2EditDatabase/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/Season.d.ts create mode 100644 TypeScript/2EditDatabase/types/models/enums/SideType.d.ts create mode 100644 TypeScript/2EditDatabase/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/2EditDatabase/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/2EditDatabase/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/2EditDatabase/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/2EditDatabase/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/2EditDatabase/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/2EditDatabase/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/2EditDatabase/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/3GetSptConfigFile/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/Season.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/models/enums/SideType.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/3GetSptConfigFile/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/Season.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SideType.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/4UseACustomConfigFile/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/Season.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/models/enums/SideType.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/4UseACustomConfigFile/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/5ReplaceMethod/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/5ReplaceMethod/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/Season.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/models/enums/SideType.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/5ReplaceMethod/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/6ReferenceAnotherClass/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/Season.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/models/enums/SideType.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/6ReferenceAnotherClass/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/7OnLoadHook/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/7OnLoadHook/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/Season.d.ts create mode 100644 TypeScript/7OnLoadHook/types/models/enums/SideType.d.ts create mode 100644 TypeScript/7OnLoadHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/7OnLoadHook/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/7OnLoadHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/7OnLoadHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/7OnLoadHook/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/7OnLoadHook/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/7OnLoadHook/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/7OnLoadHook/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/8OnUpdateHook/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/8OnUpdateHook/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/Season.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/models/enums/SideType.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/8OnUpdateHook/types/utils/cloners/StructuredCloner.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/common/tables/ILootBase.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/dialog/ICreateGroupMailRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/game/IGameModeRequestData.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/game/IGameModeResponse.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/game/ISendReportRequest.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IAcceptGroupInviteRequest.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IAcceptGroupInviteResponse.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/ICancelGroupInviteRequest.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/ICreateGroupRequestData.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IDeclineGroupInviteRequest.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusRequestData.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusResponse.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IGetProfileRequestData.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IGroupCharacter.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchRequestData.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchResult.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupCurrentResponse.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStartGameRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStatusRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStatusResponse.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupTransferRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IProfileStatusRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IProfileStatusResponse.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IRaidSettings.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IRequestIdRequest.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/ISendGroupInviteRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/IServer.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/match/ISessionStatus.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/eft/match/ITransferGroupRequest.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsAid.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsAidNickname.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupId.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsNotificationEvent.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsPing.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsRagfairOfferSold.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/eft/ws/IWsUserConfirmed.d.ts delete mode 100644 TypeScript/9RouterHooks/types/models/enums/BotAmount.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/DateTime.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/NotificationEventType.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/PlayersSpawnPlace.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/ProfileStatus.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/RaidSettings/BotAmount.d.ts rename TypeScript/9RouterHooks/types/models/enums/{ => RaidSettings}/BotDifficulty.d.ts (100%) create mode 100644 TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/Season.d.ts create mode 100644 TypeScript/9RouterHooks/types/models/enums/SideType.d.ts create mode 100644 TypeScript/9RouterHooks/types/servers/ws/AkiWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/9RouterHooks/types/servers/ws/IWebSocketConnectionHandler.d.ts create mode 100644 TypeScript/9RouterHooks/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/9RouterHooks/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts create mode 100644 TypeScript/9RouterHooks/types/utils/cloners/ICloner.d.ts create mode 100644 TypeScript/9RouterHooks/types/utils/cloners/JsonCloner.d.ts create mode 100644 TypeScript/9RouterHooks/types/utils/cloners/RecursiveCloner.d.ts create mode 100644 TypeScript/9RouterHooks/types/utils/cloners/StructuredCloner.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/10ScopesAndTypes/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/10ScopesAndTypes/types/controllers/BuildController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/BuildController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts b/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts +++ b/TypeScript/10ScopesAndTypes/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/10ScopesAndTypes/types/di/Router.d.ts b/TypeScript/10ScopesAndTypes/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/10ScopesAndTypes/types/di/Router.d.ts +++ b/TypeScript/10ScopesAndTypes/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/10ScopesAndTypes/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/10ScopesAndTypes/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/10ScopesAndTypes/types/helpers/TraderAssortHelper.d.ts b/TypeScript/10ScopesAndTypes/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/10ScopesAndTypes/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/10ScopesAndTypes/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts b/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts +++ b/TypeScript/10ScopesAndTypes/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocation.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStatusRequest.d.ts similarity index 80% rename from TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusRequestData.d.ts rename to TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStatusRequest.d.ts index 28b9500..c5fc71d 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -1,5 +1,5 @@ import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { +export interface IMatchGroupStatusRequest { location: string; savage: boolean; dt: string; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IServer.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/notifier/INotifier.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsAid.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsPing.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/DateTime.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/NotificationEventType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/ProfileStatus.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/BotAmount.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/BotAmount.d.ts similarity index 85% rename from TypeScript/12ClassExtensionOverride/types/models/enums/BotAmount.d.ts rename to TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/BotAmount.d.ts index 9ef9cab..ad7b6f0 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/BotAmount.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/BotAmount.d.ts @@ -1,5 +1,6 @@ export declare enum BotAmount { AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", LOW = "Low", MEDIUM = "Medium", HIGH = "High", diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/BotDifficulty.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/10ScopesAndTypes/types/models/enums/BotDifficulty.d.ts rename to TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/Season.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/SideType.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/10ScopesAndTypes/types/models/spt/server/ILocations.d.ts b/TypeScript/10ScopesAndTypes/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/10ScopesAndTypes/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/10ScopesAndTypes/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts b/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/10ScopesAndTypes/types/routers/HttpRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/HttpRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/10ScopesAndTypes/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/10ScopesAndTypes/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/10ScopesAndTypes/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/WebSocketServer.d.ts b/TypeScript/10ScopesAndTypes/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/WebSocketServer.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/http/AkiHttpListener.d.ts b/TypeScript/10ScopesAndTypes/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/10ScopesAndTypes/types/servers/http/IHttpListener.d.ts b/TypeScript/10ScopesAndTypes/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/10ScopesAndTypes/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/10ScopesAndTypes/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/10ScopesAndTypes/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/10ScopesAndTypes/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/10ScopesAndTypes/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/10ScopesAndTypes/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/10ScopesAndTypes/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/10ScopesAndTypes/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/10ScopesAndTypes/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/10ScopesAndTypes/types/services/BotGenerationCacheService.d.ts b/TypeScript/10ScopesAndTypes/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/10ScopesAndTypes/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/10ScopesAndTypes/types/services/BotLootCacheService.d.ts b/TypeScript/10ScopesAndTypes/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/10ScopesAndTypes/types/services/BotLootCacheService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/10ScopesAndTypes/types/services/CustomLocationWaveService.d.ts b/TypeScript/10ScopesAndTypes/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/10ScopesAndTypes/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/10ScopesAndTypes/types/services/LocaleService.d.ts b/TypeScript/10ScopesAndTypes/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/LocaleService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/10ScopesAndTypes/types/services/NotificationService.d.ts b/TypeScript/10ScopesAndTypes/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/NotificationService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/10ScopesAndTypes/types/services/OpenZoneService.d.ts b/TypeScript/10ScopesAndTypes/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/10ScopesAndTypes/types/services/OpenZoneService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/10ScopesAndTypes/types/services/ProfileSnapshotService.d.ts b/TypeScript/10ScopesAndTypes/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/10ScopesAndTypes/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/10ScopesAndTypes/types/services/TraderServicesService.d.ts b/TypeScript/10ScopesAndTypes/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/10ScopesAndTypes/types/services/TraderServicesService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts b/TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/10ScopesAndTypes/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/10ScopesAndTypes/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/10ScopesAndTypes/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/10ScopesAndTypes/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts b/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts +++ b/TypeScript/10ScopesAndTypes/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/10ScopesAndTypes/types/utils/cloners/ICloner.d.ts b/TypeScript/10ScopesAndTypes/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/10ScopesAndTypes/types/utils/cloners/JsonCloner.d.ts b/TypeScript/10ScopesAndTypes/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/10ScopesAndTypes/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/10ScopesAndTypes/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/10ScopesAndTypes/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/10ScopesAndTypes/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/10ScopesAndTypes/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/11BundleLoadingSample/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/11BundleLoadingSample/types/controllers/BuildController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/BuildController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts b/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts +++ b/TypeScript/11BundleLoadingSample/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/11BundleLoadingSample/types/di/Router.d.ts b/TypeScript/11BundleLoadingSample/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/11BundleLoadingSample/types/di/Router.d.ts +++ b/TypeScript/11BundleLoadingSample/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/11BundleLoadingSample/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/11BundleLoadingSample/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/11BundleLoadingSample/types/helpers/TraderAssortHelper.d.ts b/TypeScript/11BundleLoadingSample/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/11BundleLoadingSample/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/11BundleLoadingSample/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts b/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts +++ b/TypeScript/11BundleLoadingSample/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocation.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStatusRequest.d.ts similarity index 80% rename from TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts rename to TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStatusRequest.d.ts index 28b9500..c5fc71d 100644 --- a/TypeScript/10ScopesAndTypes/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -1,5 +1,5 @@ import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { +export interface IMatchGroupStatusRequest { location: string; savage: boolean; dt: string; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IServer.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/notifier/INotifier.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsAid.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsPing.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/DateTime.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/NotificationEventType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/ProfileStatus.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/10ScopesAndTypes/types/models/enums/BotAmount.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/BotAmount.d.ts similarity index 85% rename from TypeScript/10ScopesAndTypes/types/models/enums/BotAmount.d.ts rename to TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/BotAmount.d.ts index 9ef9cab..ad7b6f0 100644 --- a/TypeScript/10ScopesAndTypes/types/models/enums/BotAmount.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/BotAmount.d.ts @@ -1,5 +1,6 @@ export declare enum BotAmount { AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", LOW = "Low", MEDIUM = "Medium", HIGH = "High", diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/BotDifficulty.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/11BundleLoadingSample/types/models/enums/BotDifficulty.d.ts rename to TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/Season.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/SideType.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/11BundleLoadingSample/types/models/spt/server/ILocations.d.ts b/TypeScript/11BundleLoadingSample/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/11BundleLoadingSample/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/11BundleLoadingSample/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts b/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/11BundleLoadingSample/types/routers/HttpRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/HttpRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/11BundleLoadingSample/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/11BundleLoadingSample/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/11BundleLoadingSample/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/WebSocketServer.d.ts b/TypeScript/11BundleLoadingSample/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/WebSocketServer.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/http/AkiHttpListener.d.ts b/TypeScript/11BundleLoadingSample/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/11BundleLoadingSample/types/servers/http/IHttpListener.d.ts b/TypeScript/11BundleLoadingSample/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/11BundleLoadingSample/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/11BundleLoadingSample/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/11BundleLoadingSample/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/11BundleLoadingSample/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/11BundleLoadingSample/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/11BundleLoadingSample/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/11BundleLoadingSample/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/11BundleLoadingSample/types/services/BotGenerationCacheService.d.ts b/TypeScript/11BundleLoadingSample/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/11BundleLoadingSample/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/11BundleLoadingSample/types/services/BotLootCacheService.d.ts b/TypeScript/11BundleLoadingSample/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/11BundleLoadingSample/types/services/BotLootCacheService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/11BundleLoadingSample/types/services/CustomLocationWaveService.d.ts b/TypeScript/11BundleLoadingSample/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/11BundleLoadingSample/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/11BundleLoadingSample/types/services/LocaleService.d.ts b/TypeScript/11BundleLoadingSample/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/LocaleService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/11BundleLoadingSample/types/services/NotificationService.d.ts b/TypeScript/11BundleLoadingSample/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/NotificationService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/11BundleLoadingSample/types/services/OpenZoneService.d.ts b/TypeScript/11BundleLoadingSample/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/11BundleLoadingSample/types/services/OpenZoneService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/11BundleLoadingSample/types/services/ProfileSnapshotService.d.ts b/TypeScript/11BundleLoadingSample/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/11BundleLoadingSample/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/11BundleLoadingSample/types/services/TraderServicesService.d.ts b/TypeScript/11BundleLoadingSample/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/11BundleLoadingSample/types/services/TraderServicesService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/11BundleLoadingSample/types/services/mod/CustomItemService.d.ts b/TypeScript/11BundleLoadingSample/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/11BundleLoadingSample/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/11BundleLoadingSample/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/11BundleLoadingSample/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/11BundleLoadingSample/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts b/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts +++ b/TypeScript/11BundleLoadingSample/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/11BundleLoadingSample/types/utils/cloners/ICloner.d.ts b/TypeScript/11BundleLoadingSample/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/11BundleLoadingSample/types/utils/cloners/JsonCloner.d.ts b/TypeScript/11BundleLoadingSample/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/11BundleLoadingSample/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/11BundleLoadingSample/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/11BundleLoadingSample/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/11BundleLoadingSample/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/11BundleLoadingSample/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/BuildController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/BuildController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts b/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts b/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/12ClassExtensionOverride/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/12ClassExtensionOverride/types/generators/PlayerScavGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/12ClassExtensionOverride/types/helpers/TraderAssortHelper.d.ts b/TypeScript/12ClassExtensionOverride/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/12ClassExtensionOverride/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts b/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocation.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStatusRequest.d.ts similarity index 80% rename from TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts rename to TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStatusRequest.d.ts index 28b9500..c5fc71d 100644 --- a/TypeScript/11BundleLoadingSample/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -1,5 +1,5 @@ import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { +export interface IMatchGroupStatusRequest { location: string; savage: boolean; dt: string; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/IServer.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/notifier/INotifier.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsAid.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsPing.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/DateTime.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/NotificationEventType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/ProfileStatus.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/11BundleLoadingSample/types/models/enums/BotAmount.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/BotAmount.d.ts similarity index 85% rename from TypeScript/11BundleLoadingSample/types/models/enums/BotAmount.d.ts rename to TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/BotAmount.d.ts index 9ef9cab..ad7b6f0 100644 --- a/TypeScript/11BundleLoadingSample/types/models/enums/BotAmount.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/BotAmount.d.ts @@ -1,5 +1,6 @@ export declare enum BotAmount { AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", LOW = "Low", MEDIUM = "Medium", HIGH = "High", diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/BotDifficulty.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/12ClassExtensionOverride/types/models/enums/BotDifficulty.d.ts rename to TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/Season.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/SideType.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ILocations.d.ts b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/12ClassExtensionOverride/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/12ClassExtensionOverride/types/routers/HttpRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/HttpRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/12ClassExtensionOverride/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/12ClassExtensionOverride/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/WebSocketServer.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/WebSocketServer.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/http/AkiHttpListener.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/12ClassExtensionOverride/types/servers/http/IHttpListener.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/12ClassExtensionOverride/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/12ClassExtensionOverride/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/12ClassExtensionOverride/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/12ClassExtensionOverride/types/services/BotGenerationCacheService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/12ClassExtensionOverride/types/services/BotLootCacheService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/BotLootCacheService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/12ClassExtensionOverride/types/services/CustomLocationWaveService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/12ClassExtensionOverride/types/services/LocaleService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/LocaleService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/NotificationService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/NotificationService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/12ClassExtensionOverride/types/services/OpenZoneService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/OpenZoneService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/12ClassExtensionOverride/types/services/ProfileSnapshotService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/12ClassExtensionOverride/types/services/TraderServicesService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/TraderServicesService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/12ClassExtensionOverride/types/services/mod/CustomItemService.d.ts b/TypeScript/12ClassExtensionOverride/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/12ClassExtensionOverride/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/12ClassExtensionOverride/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/12ClassExtensionOverride/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts +++ b/TypeScript/12ClassExtensionOverride/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/12ClassExtensionOverride/types/utils/cloners/ICloner.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/12ClassExtensionOverride/types/utils/cloners/JsonCloner.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/12ClassExtensionOverride/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/12ClassExtensionOverride/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/12ClassExtensionOverride/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/12ClassExtensionOverride/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/13AddTrader/types/callbacks/BotCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/13AddTrader/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/13AddTrader/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/13AddTrader/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/13AddTrader/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/13AddTrader/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/13AddTrader/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/13AddTrader/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/13AddTrader/types/controllers/BotController.d.ts b/TypeScript/13AddTrader/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/13AddTrader/types/controllers/BotController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/13AddTrader/types/controllers/BuildController.d.ts b/TypeScript/13AddTrader/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/13AddTrader/types/controllers/BuildController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts b/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/13AddTrader/types/controllers/GameController.d.ts b/TypeScript/13AddTrader/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/13AddTrader/types/controllers/GameController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/13AddTrader/types/controllers/HealthController.d.ts b/TypeScript/13AddTrader/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/13AddTrader/types/controllers/HealthController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts b/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/13AddTrader/types/controllers/InraidController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/13AddTrader/types/controllers/LocationController.d.ts b/TypeScript/13AddTrader/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/13AddTrader/types/controllers/LocationController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/13AddTrader/types/controllers/MatchController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/13AddTrader/types/controllers/QuestController.d.ts b/TypeScript/13AddTrader/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/13AddTrader/types/controllers/QuestController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts b/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/13AddTrader/types/controllers/TradeController.d.ts b/TypeScript/13AddTrader/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/13AddTrader/types/controllers/TradeController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/13AddTrader/types/controllers/TraderController.d.ts b/TypeScript/13AddTrader/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/13AddTrader/types/controllers/TraderController.d.ts +++ b/TypeScript/13AddTrader/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/13AddTrader/types/di/Router.d.ts b/TypeScript/13AddTrader/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/13AddTrader/types/di/Router.d.ts +++ b/TypeScript/13AddTrader/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/13AddTrader/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/13AddTrader/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/13AddTrader/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/13AddTrader/types/generators/LocationGenerator.d.ts b/TypeScript/13AddTrader/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/13AddTrader/types/generators/LocationGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/13AddTrader/types/generators/LootGenerator.d.ts b/TypeScript/13AddTrader/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/13AddTrader/types/generators/LootGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/13AddTrader/types/generators/PlayerScavGenerator.d.ts b/TypeScript/13AddTrader/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/13AddTrader/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/13AddTrader/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/13AddTrader/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/13AddTrader/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/13AddTrader/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts b/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/13AddTrader/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/13AddTrader/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/13AddTrader/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/13AddTrader/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts b/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/13AddTrader/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/13AddTrader/types/helpers/HandbookHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/13AddTrader/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts b/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/13AddTrader/types/helpers/NotificationSendHelper.d.ts b/TypeScript/13AddTrader/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/13AddTrader/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts b/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/13AddTrader/types/helpers/PresetHelper.d.ts b/TypeScript/13AddTrader/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/13AddTrader/types/helpers/PresetHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts b/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/13AddTrader/types/helpers/RagfairHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/13AddTrader/types/helpers/RagfairServerHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/13AddTrader/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/13AddTrader/types/helpers/RepairHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/13AddTrader/types/helpers/RepairHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/13AddTrader/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/13AddTrader/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/13AddTrader/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/13AddTrader/types/helpers/TradeHelper.d.ts b/TypeScript/13AddTrader/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/13AddTrader/types/helpers/TradeHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/13AddTrader/types/helpers/TraderAssortHelper.d.ts b/TypeScript/13AddTrader/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/13AddTrader/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/13AddTrader/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/13AddTrader/types/loaders/BundleLoader.d.ts b/TypeScript/13AddTrader/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/13AddTrader/types/loaders/BundleLoader.d.ts +++ b/TypeScript/13AddTrader/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/13AddTrader/types/models/eft/common/ILocation.d.ts b/TypeScript/13AddTrader/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/13AddTrader/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/13AddTrader/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/13AddTrader/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/13AddTrader/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/13AddTrader/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStatusRequest.d.ts similarity index 80% rename from TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusRequestData.d.ts rename to TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStatusRequest.d.ts index 28b9500..c5fc71d 100644 --- a/TypeScript/13AddTrader/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -1,5 +1,5 @@ import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { +export interface IMatchGroupStatusRequest { location: string; savage: boolean; dt: string; diff --git a/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/13AddTrader/types/models/eft/match/IServer.d.ts b/TypeScript/13AddTrader/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/13AddTrader/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/13AddTrader/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/13AddTrader/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/13AddTrader/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/13AddTrader/types/models/eft/notifier/INotifier.d.ts b/TypeScript/13AddTrader/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/13AddTrader/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/13AddTrader/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/13AddTrader/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/13AddTrader/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/13AddTrader/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsAid.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsPing.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/13AddTrader/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/13AddTrader/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/13AddTrader/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/13AddTrader/types/models/enums/DateTime.d.ts b/TypeScript/13AddTrader/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/13AddTrader/types/models/enums/NotificationEventType.d.ts b/TypeScript/13AddTrader/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/13AddTrader/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/13AddTrader/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/13AddTrader/types/models/enums/ProfileStatus.d.ts b/TypeScript/13AddTrader/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/13AddTrader/types/models/enums/QuestRewardType.d.ts b/TypeScript/13AddTrader/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/13AddTrader/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/13AddTrader/types/models/enums/BotAmount.d.ts b/TypeScript/13AddTrader/types/models/enums/RaidSettings/BotAmount.d.ts similarity index 85% rename from TypeScript/13AddTrader/types/models/enums/BotAmount.d.ts rename to TypeScript/13AddTrader/types/models/enums/RaidSettings/BotAmount.d.ts index 9ef9cab..ad7b6f0 100644 --- a/TypeScript/13AddTrader/types/models/enums/BotAmount.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/RaidSettings/BotAmount.d.ts @@ -1,5 +1,6 @@ export declare enum BotAmount { AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", LOW = "Low", MEDIUM = "Medium", HIGH = "High", diff --git a/TypeScript/13AddTrader/types/models/enums/BotDifficulty.d.ts b/TypeScript/13AddTrader/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/13AddTrader/types/models/enums/BotDifficulty.d.ts rename to TypeScript/13AddTrader/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/13AddTrader/types/models/enums/Season.d.ts b/TypeScript/13AddTrader/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/13AddTrader/types/models/enums/SideType.d.ts b/TypeScript/13AddTrader/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/13AddTrader/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/13AddTrader/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/13AddTrader/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/13AddTrader/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/13AddTrader/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/13AddTrader/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/13AddTrader/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/13AddTrader/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/13AddTrader/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/13AddTrader/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/13AddTrader/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/13AddTrader/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/13AddTrader/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/13AddTrader/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/13AddTrader/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/13AddTrader/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/13AddTrader/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/13AddTrader/types/models/spt/server/ILocations.d.ts b/TypeScript/13AddTrader/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/13AddTrader/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/13AddTrader/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts b/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/13AddTrader/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/13AddTrader/types/routers/HttpRouter.d.ts b/TypeScript/13AddTrader/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/13AddTrader/types/routers/HttpRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/13AddTrader/types/routers/ItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/13AddTrader/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/13AddTrader/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/13AddTrader/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/13AddTrader/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/13AddTrader/types/servers/WebSocketServer.d.ts b/TypeScript/13AddTrader/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/13AddTrader/types/servers/WebSocketServer.d.ts +++ b/TypeScript/13AddTrader/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/13AddTrader/types/servers/http/AkiHttpListener.d.ts b/TypeScript/13AddTrader/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/13AddTrader/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/13AddTrader/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/13AddTrader/types/servers/http/IHttpListener.d.ts b/TypeScript/13AddTrader/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/13AddTrader/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/13AddTrader/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/13AddTrader/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/13AddTrader/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/13AddTrader/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/13AddTrader/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/13AddTrader/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/13AddTrader/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/13AddTrader/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/13AddTrader/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/13AddTrader/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/13AddTrader/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/13AddTrader/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/13AddTrader/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/13AddTrader/types/services/BotGenerationCacheService.d.ts b/TypeScript/13AddTrader/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/13AddTrader/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/13AddTrader/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/13AddTrader/types/services/BotLootCacheService.d.ts b/TypeScript/13AddTrader/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/13AddTrader/types/services/BotLootCacheService.d.ts +++ b/TypeScript/13AddTrader/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/13AddTrader/types/services/CustomLocationWaveService.d.ts b/TypeScript/13AddTrader/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/13AddTrader/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/13AddTrader/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/13AddTrader/types/services/FenceService.d.ts b/TypeScript/13AddTrader/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/13AddTrader/types/services/FenceService.d.ts +++ b/TypeScript/13AddTrader/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/13AddTrader/types/services/InsuranceService.d.ts +++ b/TypeScript/13AddTrader/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/13AddTrader/types/services/LocaleService.d.ts b/TypeScript/13AddTrader/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/13AddTrader/types/services/LocaleService.d.ts +++ b/TypeScript/13AddTrader/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/13AddTrader/types/services/NotificationService.d.ts b/TypeScript/13AddTrader/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/13AddTrader/types/services/NotificationService.d.ts +++ b/TypeScript/13AddTrader/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/13AddTrader/types/services/OpenZoneService.d.ts b/TypeScript/13AddTrader/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/13AddTrader/types/services/OpenZoneService.d.ts +++ b/TypeScript/13AddTrader/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/13AddTrader/types/services/ProfileSnapshotService.d.ts b/TypeScript/13AddTrader/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/13AddTrader/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/13AddTrader/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts +++ b/TypeScript/13AddTrader/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/13AddTrader/types/services/TraderServicesService.d.ts b/TypeScript/13AddTrader/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/13AddTrader/types/services/TraderServicesService.d.ts +++ b/TypeScript/13AddTrader/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/13AddTrader/types/services/mod/CustomItemService.d.ts b/TypeScript/13AddTrader/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/13AddTrader/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/13AddTrader/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/13AddTrader/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/13AddTrader/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/13AddTrader/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/13AddTrader/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts b/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts +++ b/TypeScript/13AddTrader/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/13AddTrader/types/utils/RandomUtil.d.ts b/TypeScript/13AddTrader/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/13AddTrader/types/utils/RandomUtil.d.ts +++ b/TypeScript/13AddTrader/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/13AddTrader/types/utils/cloners/ICloner.d.ts b/TypeScript/13AddTrader/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/13AddTrader/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/13AddTrader/types/utils/cloners/JsonCloner.d.ts b/TypeScript/13AddTrader/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/13AddTrader/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/13AddTrader/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/13AddTrader/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/13AddTrader/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/13AddTrader/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/13AddTrader/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/13AddTrader/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/BotCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/BuildController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/BuildController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/14AfterDBLoadHook/types/controllers/TraderController.d.ts b/TypeScript/14AfterDBLoadHook/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/14AfterDBLoadHook/types/controllers/TraderController.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts b/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/14AfterDBLoadHook/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/14AfterDBLoadHook/types/generators/PlayerScavGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HandbookHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/NotificationSendHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairServerHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RepairHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RepairHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/TradeHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/TradeHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/14AfterDBLoadHook/types/helpers/TraderAssortHelper.d.ts b/TypeScript/14AfterDBLoadHook/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/14AfterDBLoadHook/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/14AfterDBLoadHook/types/loaders/BundleLoader.d.ts b/TypeScript/14AfterDBLoadHook/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/14AfterDBLoadHook/types/loaders/BundleLoader.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocation.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/IServer.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/notifier/INotifier.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsAid.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsPing.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/BotAmount.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/DateTime.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/NotificationEventType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/ProfileStatus.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/QuestRewardType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/BotDifficulty.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/14AfterDBLoadHook/types/models/enums/BotDifficulty.d.ts rename to TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/Season.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/SideType.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/14AfterDBLoadHook/types/models/spt/server/ILocations.d.ts b/TypeScript/14AfterDBLoadHook/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/14AfterDBLoadHook/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/14AfterDBLoadHook/types/routers/HttpRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/HttpRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/14AfterDBLoadHook/types/routers/ItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/14AfterDBLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/14AfterDBLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/servers/WebSocketServer.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/WebSocketServer.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/14AfterDBLoadHook/types/servers/http/AkiHttpListener.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/14AfterDBLoadHook/types/servers/http/IHttpListener.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/14AfterDBLoadHook/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/14AfterDBLoadHook/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/14AfterDBLoadHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/14AfterDBLoadHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/14AfterDBLoadHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/14AfterDBLoadHook/types/services/BotGenerationCacheService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/14AfterDBLoadHook/types/services/BotLootCacheService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/BotLootCacheService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/14AfterDBLoadHook/types/services/CustomLocationWaveService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/14AfterDBLoadHook/types/services/LocaleService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/LocaleService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/NotificationService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/NotificationService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/14AfterDBLoadHook/types/services/OpenZoneService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/OpenZoneService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/14AfterDBLoadHook/types/services/ProfileSnapshotService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/14AfterDBLoadHook/types/services/TraderServicesService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/TraderServicesService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/14AfterDBLoadHook/types/services/mod/CustomItemService.d.ts b/TypeScript/14AfterDBLoadHook/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/14AfterDBLoadHook/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/14AfterDBLoadHook/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/14AfterDBLoadHook/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/14AfterDBLoadHook/types/utils/RandomUtil.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/14AfterDBLoadHook/types/utils/RandomUtil.d.ts +++ b/TypeScript/14AfterDBLoadHook/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/14AfterDBLoadHook/types/utils/cloners/ICloner.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/14AfterDBLoadHook/types/utils/cloners/JsonCloner.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/14AfterDBLoadHook/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/14AfterDBLoadHook/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/14AfterDBLoadHook/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/14AfterDBLoadHook/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/15HttpListenerExample/types/callbacks/BotCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/15HttpListenerExample/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/15HttpListenerExample/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/15HttpListenerExample/types/controllers/BuildController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/BuildController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/15HttpListenerExample/types/controllers/TraderController.d.ts b/TypeScript/15HttpListenerExample/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/15HttpListenerExample/types/controllers/TraderController.d.ts +++ b/TypeScript/15HttpListenerExample/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/15HttpListenerExample/types/di/Router.d.ts b/TypeScript/15HttpListenerExample/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/15HttpListenerExample/types/di/Router.d.ts +++ b/TypeScript/15HttpListenerExample/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/15HttpListenerExample/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/15HttpListenerExample/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/15HttpListenerExample/types/generators/PlayerScavGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/15HttpListenerExample/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/15HttpListenerExample/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts b/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/15HttpListenerExample/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/15HttpListenerExample/types/helpers/HandbookHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/15HttpListenerExample/types/helpers/NotificationSendHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/15HttpListenerExample/types/helpers/RagfairServerHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/15HttpListenerExample/types/helpers/RepairHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RepairHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/15HttpListenerExample/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/15HttpListenerExample/types/helpers/TradeHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/TradeHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/15HttpListenerExample/types/helpers/TraderAssortHelper.d.ts b/TypeScript/15HttpListenerExample/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/15HttpListenerExample/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/15HttpListenerExample/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/15HttpListenerExample/types/loaders/BundleLoader.d.ts b/TypeScript/15HttpListenerExample/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/15HttpListenerExample/types/loaders/BundleLoader.d.ts +++ b/TypeScript/15HttpListenerExample/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocation.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/IServer.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/15HttpListenerExample/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/notifier/INotifier.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/15HttpListenerExample/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsAid.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsPing.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/BotAmount.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/15HttpListenerExample/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/DateTime.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/NotificationEventType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/ProfileStatus.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/QuestRewardType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/BotDifficulty.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/15HttpListenerExample/types/models/enums/BotDifficulty.d.ts rename to TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/Season.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/SideType.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/15HttpListenerExample/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/15HttpListenerExample/types/models/spt/server/ILocations.d.ts b/TypeScript/15HttpListenerExample/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/15HttpListenerExample/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/15HttpListenerExample/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts b/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/15HttpListenerExample/types/routers/HttpRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/15HttpListenerExample/types/routers/HttpRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/15HttpListenerExample/types/routers/ItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/15HttpListenerExample/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/15HttpListenerExample/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/15HttpListenerExample/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/15HttpListenerExample/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/servers/WebSocketServer.d.ts b/TypeScript/15HttpListenerExample/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/15HttpListenerExample/types/servers/WebSocketServer.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/15HttpListenerExample/types/servers/http/AkiHttpListener.d.ts b/TypeScript/15HttpListenerExample/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/15HttpListenerExample/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/15HttpListenerExample/types/servers/http/IHttpListener.d.ts b/TypeScript/15HttpListenerExample/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/15HttpListenerExample/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/15HttpListenerExample/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/15HttpListenerExample/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/15HttpListenerExample/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/15HttpListenerExample/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/15HttpListenerExample/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/15HttpListenerExample/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/15HttpListenerExample/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/15HttpListenerExample/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/15HttpListenerExample/types/services/BotGenerationCacheService.d.ts b/TypeScript/15HttpListenerExample/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/15HttpListenerExample/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/15HttpListenerExample/types/services/BotLootCacheService.d.ts b/TypeScript/15HttpListenerExample/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/15HttpListenerExample/types/services/BotLootCacheService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/15HttpListenerExample/types/services/CustomLocationWaveService.d.ts b/TypeScript/15HttpListenerExample/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/15HttpListenerExample/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts b/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/15HttpListenerExample/types/services/LocaleService.d.ts b/TypeScript/15HttpListenerExample/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/15HttpListenerExample/types/services/LocaleService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/15HttpListenerExample/types/services/NotificationService.d.ts b/TypeScript/15HttpListenerExample/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/15HttpListenerExample/types/services/NotificationService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/15HttpListenerExample/types/services/OpenZoneService.d.ts b/TypeScript/15HttpListenerExample/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/15HttpListenerExample/types/services/OpenZoneService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/15HttpListenerExample/types/services/ProfileSnapshotService.d.ts b/TypeScript/15HttpListenerExample/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/15HttpListenerExample/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/15HttpListenerExample/types/services/TraderServicesService.d.ts b/TypeScript/15HttpListenerExample/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/15HttpListenerExample/types/services/TraderServicesService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/15HttpListenerExample/types/services/mod/CustomItemService.d.ts b/TypeScript/15HttpListenerExample/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/15HttpListenerExample/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/15HttpListenerExample/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/15HttpListenerExample/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/15HttpListenerExample/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/15HttpListenerExample/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/15HttpListenerExample/types/utils/RandomUtil.d.ts b/TypeScript/15HttpListenerExample/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/15HttpListenerExample/types/utils/RandomUtil.d.ts +++ b/TypeScript/15HttpListenerExample/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/15HttpListenerExample/types/utils/cloners/ICloner.d.ts b/TypeScript/15HttpListenerExample/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/15HttpListenerExample/types/utils/cloners/JsonCloner.d.ts b/TypeScript/15HttpListenerExample/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/15HttpListenerExample/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/15HttpListenerExample/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/15HttpListenerExample/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/15HttpListenerExample/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/15HttpListenerExample/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/16ImporterUtil/types/callbacks/BotCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/16ImporterUtil/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/16ImporterUtil/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/16ImporterUtil/types/controllers/BuildController.d.ts b/TypeScript/16ImporterUtil/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/16ImporterUtil/types/controllers/BuildController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts b/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts b/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts b/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts b/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts b/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts b/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts b/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/16ImporterUtil/types/controllers/TraderController.d.ts b/TypeScript/16ImporterUtil/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/16ImporterUtil/types/controllers/TraderController.d.ts +++ b/TypeScript/16ImporterUtil/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/16ImporterUtil/types/di/Router.d.ts b/TypeScript/16ImporterUtil/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/16ImporterUtil/types/di/Router.d.ts +++ b/TypeScript/16ImporterUtil/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/16ImporterUtil/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/16ImporterUtil/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/16ImporterUtil/types/generators/LocationGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/16ImporterUtil/types/generators/LocationGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/16ImporterUtil/types/generators/PlayerScavGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/16ImporterUtil/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/16ImporterUtil/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/16ImporterUtil/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts b/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/16ImporterUtil/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/16ImporterUtil/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/16ImporterUtil/types/helpers/HandbookHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/16ImporterUtil/types/helpers/NotificationSendHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/16ImporterUtil/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/16ImporterUtil/types/helpers/RagfairServerHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/16ImporterUtil/types/helpers/RepairHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RepairHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/16ImporterUtil/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/16ImporterUtil/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/16ImporterUtil/types/helpers/TradeHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/16ImporterUtil/types/helpers/TradeHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/16ImporterUtil/types/helpers/TraderAssortHelper.d.ts b/TypeScript/16ImporterUtil/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/16ImporterUtil/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/16ImporterUtil/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/16ImporterUtil/types/loaders/BundleLoader.d.ts b/TypeScript/16ImporterUtil/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/16ImporterUtil/types/loaders/BundleLoader.d.ts +++ b/TypeScript/16ImporterUtil/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/ILocation.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/IServer.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/16ImporterUtil/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/16ImporterUtil/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/notifier/INotifier.d.ts b/TypeScript/16ImporterUtil/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/16ImporterUtil/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/16ImporterUtil/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/16ImporterUtil/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/16ImporterUtil/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsAid.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsPing.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/16ImporterUtil/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/BotAmount.d.ts b/TypeScript/16ImporterUtil/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/16ImporterUtil/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/16ImporterUtil/types/models/enums/DateTime.d.ts b/TypeScript/16ImporterUtil/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/NotificationEventType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/16ImporterUtil/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/ProfileStatus.d.ts b/TypeScript/16ImporterUtil/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/QuestRewardType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/BotDifficulty.d.ts b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/16ImporterUtil/types/models/enums/BotDifficulty.d.ts rename to TypeScript/16ImporterUtil/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/Season.d.ts b/TypeScript/16ImporterUtil/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/SideType.d.ts b/TypeScript/16ImporterUtil/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/16ImporterUtil/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/16ImporterUtil/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/16ImporterUtil/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/16ImporterUtil/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/16ImporterUtil/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/16ImporterUtil/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/16ImporterUtil/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/16ImporterUtil/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/16ImporterUtil/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/16ImporterUtil/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/16ImporterUtil/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/16ImporterUtil/types/models/spt/server/ILocations.d.ts b/TypeScript/16ImporterUtil/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/16ImporterUtil/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/16ImporterUtil/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts b/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/16ImporterUtil/types/routers/HttpRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/16ImporterUtil/types/routers/HttpRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/16ImporterUtil/types/routers/ItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/16ImporterUtil/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/16ImporterUtil/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/16ImporterUtil/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/16ImporterUtil/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/16ImporterUtil/types/servers/WebSocketServer.d.ts b/TypeScript/16ImporterUtil/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/16ImporterUtil/types/servers/WebSocketServer.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/16ImporterUtil/types/servers/http/AkiHttpListener.d.ts b/TypeScript/16ImporterUtil/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/16ImporterUtil/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/16ImporterUtil/types/servers/http/IHttpListener.d.ts b/TypeScript/16ImporterUtil/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/16ImporterUtil/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/16ImporterUtil/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/16ImporterUtil/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/16ImporterUtil/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/16ImporterUtil/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/16ImporterUtil/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/16ImporterUtil/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/16ImporterUtil/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/16ImporterUtil/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/16ImporterUtil/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/16ImporterUtil/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/16ImporterUtil/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/16ImporterUtil/types/services/BotGenerationCacheService.d.ts b/TypeScript/16ImporterUtil/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/16ImporterUtil/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/16ImporterUtil/types/services/BotLootCacheService.d.ts b/TypeScript/16ImporterUtil/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/16ImporterUtil/types/services/BotLootCacheService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/16ImporterUtil/types/services/CustomLocationWaveService.d.ts b/TypeScript/16ImporterUtil/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/16ImporterUtil/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/16ImporterUtil/types/services/FenceService.d.ts b/TypeScript/16ImporterUtil/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/16ImporterUtil/types/services/FenceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/16ImporterUtil/types/services/LocaleService.d.ts b/TypeScript/16ImporterUtil/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/16ImporterUtil/types/services/LocaleService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/16ImporterUtil/types/services/NotificationService.d.ts b/TypeScript/16ImporterUtil/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/16ImporterUtil/types/services/NotificationService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/16ImporterUtil/types/services/OpenZoneService.d.ts b/TypeScript/16ImporterUtil/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/16ImporterUtil/types/services/OpenZoneService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/16ImporterUtil/types/services/ProfileSnapshotService.d.ts b/TypeScript/16ImporterUtil/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/16ImporterUtil/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/16ImporterUtil/types/services/TraderServicesService.d.ts b/TypeScript/16ImporterUtil/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/16ImporterUtil/types/services/TraderServicesService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/16ImporterUtil/types/services/mod/CustomItemService.d.ts b/TypeScript/16ImporterUtil/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/16ImporterUtil/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/16ImporterUtil/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/16ImporterUtil/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/16ImporterUtil/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/16ImporterUtil/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/16ImporterUtil/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/16ImporterUtil/types/utils/RandomUtil.d.ts b/TypeScript/16ImporterUtil/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/16ImporterUtil/types/utils/RandomUtil.d.ts +++ b/TypeScript/16ImporterUtil/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/16ImporterUtil/types/utils/cloners/ICloner.d.ts b/TypeScript/16ImporterUtil/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/16ImporterUtil/types/utils/cloners/JsonCloner.d.ts b/TypeScript/16ImporterUtil/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/16ImporterUtil/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/16ImporterUtil/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/16ImporterUtil/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/16ImporterUtil/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/16ImporterUtil/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/16ImporterUtil/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BotCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BuildController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/BuildController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TraderController.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/controllers/TraderController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/PlayerScavGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HandbookHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotificationSendHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairServerHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepairHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepairHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TradeHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TradeHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderAssortHelper.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/17AsyncImporterWithDependency1/types/loaders/BundleLoader.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/loaders/BundleLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocation.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IServer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/notifier/INotifier.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsAid.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsPing.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BotAmount.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/DateTime.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/NotificationEventType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ProfileStatus.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestRewardType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/BotDifficulty.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/17AsyncImporterWithDependency1/types/models/enums/BotDifficulty.d.ts rename to TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/Season.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SideType.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ILocations.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/HttpRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/HttpRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/ItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/WebSocketServer.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/WebSocketServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/AkiHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/IHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/BotGenerationCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/BotLootCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/BotLootCacheService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/CustomLocationWaveService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/LocaleService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/LocaleService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/NotificationService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/NotificationService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/OpenZoneService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/OpenZoneService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileSnapshotService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/TraderServicesService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/TraderServicesService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/mod/CustomItemService.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/17AsyncImporterWithDependency1/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/RandomUtil.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/17AsyncImporterWithDependency1/types/utils/RandomUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/ICloner.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/JsonCloner.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency1/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BotCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BuildController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/BuildController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TraderController.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/controllers/TraderController.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/PlayerScavGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HandbookHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotificationSendHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairServerHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepairHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepairHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TradeHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TradeHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderAssortHelper.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/17AsyncImporterWithDependency2/types/loaders/BundleLoader.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/loaders/BundleLoader.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocation.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IServer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/notifier/INotifier.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsAid.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsPing.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BotAmount.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/DateTime.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/NotificationEventType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ProfileStatus.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestRewardType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/BotDifficulty.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/17AsyncImporterWithDependency2/types/models/enums/BotDifficulty.d.ts rename to TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/Season.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SideType.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ILocations.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/HttpRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/HttpRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/ItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/WebSocketServer.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/WebSocketServer.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/AkiHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/IHttpListener.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/BotGenerationCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/BotLootCacheService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/BotLootCacheService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/CustomLocationWaveService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/LocaleService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/LocaleService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/NotificationService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/NotificationService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/OpenZoneService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/OpenZoneService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileSnapshotService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/TraderServicesService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/TraderServicesService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/mod/CustomItemService.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/17AsyncImporterWithDependency2/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/RandomUtil.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/17AsyncImporterWithDependency2/types/utils/RandomUtil.d.ts +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/ICloner.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/JsonCloner.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/17AsyncImporterWithDependency2/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/18CustomItemService/types/callbacks/BotCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/18CustomItemService/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/18CustomItemService/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/18CustomItemService/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/18CustomItemService/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/18CustomItemService/types/controllers/BotController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/18CustomItemService/types/controllers/BuildController.d.ts b/TypeScript/18CustomItemService/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/18CustomItemService/types/controllers/BuildController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts b/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/18CustomItemService/types/controllers/GameController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts b/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts b/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts b/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts b/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts b/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/18CustomItemService/types/controllers/TradeController.d.ts b/TypeScript/18CustomItemService/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/18CustomItemService/types/controllers/TradeController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/18CustomItemService/types/controllers/TraderController.d.ts b/TypeScript/18CustomItemService/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/18CustomItemService/types/controllers/TraderController.d.ts +++ b/TypeScript/18CustomItemService/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/18CustomItemService/types/di/Router.d.ts b/TypeScript/18CustomItemService/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/18CustomItemService/types/di/Router.d.ts +++ b/TypeScript/18CustomItemService/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/18CustomItemService/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/18CustomItemService/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/18CustomItemService/types/generators/LocationGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/18CustomItemService/types/generators/LocationGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/18CustomItemService/types/generators/PlayerScavGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/18CustomItemService/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/18CustomItemService/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/18CustomItemService/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/18CustomItemService/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/18CustomItemService/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts b/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/18CustomItemService/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/18CustomItemService/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/18CustomItemService/types/helpers/HandbookHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/18CustomItemService/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/18CustomItemService/types/helpers/NotificationSendHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/18CustomItemService/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/18CustomItemService/types/helpers/RagfairServerHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/18CustomItemService/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/18CustomItemService/types/helpers/RepairHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/18CustomItemService/types/helpers/RepairHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/18CustomItemService/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/18CustomItemService/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/18CustomItemService/types/helpers/TradeHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/18CustomItemService/types/helpers/TradeHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/18CustomItemService/types/helpers/TraderAssortHelper.d.ts b/TypeScript/18CustomItemService/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/18CustomItemService/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/18CustomItemService/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/18CustomItemService/types/loaders/BundleLoader.d.ts b/TypeScript/18CustomItemService/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/18CustomItemService/types/loaders/BundleLoader.d.ts +++ b/TypeScript/18CustomItemService/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/common/ILocation.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/18CustomItemService/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/18CustomItemService/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/18CustomItemService/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/IServer.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/18CustomItemService/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/18CustomItemService/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/18CustomItemService/types/models/eft/notifier/INotifier.d.ts b/TypeScript/18CustomItemService/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/18CustomItemService/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/18CustomItemService/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/18CustomItemService/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/18CustomItemService/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/18CustomItemService/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsAid.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsPing.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/18CustomItemService/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/18CustomItemService/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/18CustomItemService/types/models/enums/BotAmount.d.ts b/TypeScript/18CustomItemService/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/18CustomItemService/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/18CustomItemService/types/models/enums/DateTime.d.ts b/TypeScript/18CustomItemService/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/NotificationEventType.d.ts b/TypeScript/18CustomItemService/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/18CustomItemService/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/ProfileStatus.d.ts b/TypeScript/18CustomItemService/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/QuestRewardType.d.ts b/TypeScript/18CustomItemService/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/18CustomItemService/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/18CustomItemService/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/BotDifficulty.d.ts b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/18CustomItemService/types/models/enums/BotDifficulty.d.ts rename to TypeScript/18CustomItemService/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/Season.d.ts b/TypeScript/18CustomItemService/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/18CustomItemService/types/models/enums/SideType.d.ts b/TypeScript/18CustomItemService/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/18CustomItemService/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/18CustomItemService/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/18CustomItemService/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/18CustomItemService/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/18CustomItemService/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/18CustomItemService/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/18CustomItemService/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/18CustomItemService/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/18CustomItemService/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/18CustomItemService/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/18CustomItemService/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/18CustomItemService/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/18CustomItemService/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/18CustomItemService/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/18CustomItemService/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/18CustomItemService/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/18CustomItemService/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/18CustomItemService/types/models/spt/server/ILocations.d.ts b/TypeScript/18CustomItemService/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/18CustomItemService/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/18CustomItemService/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts b/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/18CustomItemService/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/18CustomItemService/types/routers/HttpRouter.d.ts b/TypeScript/18CustomItemService/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/18CustomItemService/types/routers/HttpRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/18CustomItemService/types/routers/ItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/18CustomItemService/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/18CustomItemService/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/18CustomItemService/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/18CustomItemService/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/18CustomItemService/types/servers/WebSocketServer.d.ts b/TypeScript/18CustomItemService/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/18CustomItemService/types/servers/WebSocketServer.d.ts +++ b/TypeScript/18CustomItemService/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/18CustomItemService/types/servers/http/AkiHttpListener.d.ts b/TypeScript/18CustomItemService/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/18CustomItemService/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/18CustomItemService/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/18CustomItemService/types/servers/http/IHttpListener.d.ts b/TypeScript/18CustomItemService/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/18CustomItemService/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/18CustomItemService/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/18CustomItemService/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/18CustomItemService/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/18CustomItemService/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/18CustomItemService/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/18CustomItemService/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/18CustomItemService/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/18CustomItemService/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/18CustomItemService/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/18CustomItemService/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/18CustomItemService/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/18CustomItemService/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/18CustomItemService/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/18CustomItemService/types/services/BotGenerationCacheService.d.ts b/TypeScript/18CustomItemService/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/18CustomItemService/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/18CustomItemService/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/18CustomItemService/types/services/BotLootCacheService.d.ts b/TypeScript/18CustomItemService/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/18CustomItemService/types/services/BotLootCacheService.d.ts +++ b/TypeScript/18CustomItemService/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/18CustomItemService/types/services/CustomLocationWaveService.d.ts b/TypeScript/18CustomItemService/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/18CustomItemService/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/18CustomItemService/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/18CustomItemService/types/services/FenceService.d.ts b/TypeScript/18CustomItemService/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/18CustomItemService/types/services/FenceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts +++ b/TypeScript/18CustomItemService/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/18CustomItemService/types/services/LocaleService.d.ts b/TypeScript/18CustomItemService/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/18CustomItemService/types/services/LocaleService.d.ts +++ b/TypeScript/18CustomItemService/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/18CustomItemService/types/services/NotificationService.d.ts b/TypeScript/18CustomItemService/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/18CustomItemService/types/services/NotificationService.d.ts +++ b/TypeScript/18CustomItemService/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/18CustomItemService/types/services/OpenZoneService.d.ts b/TypeScript/18CustomItemService/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/18CustomItemService/types/services/OpenZoneService.d.ts +++ b/TypeScript/18CustomItemService/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/18CustomItemService/types/services/ProfileSnapshotService.d.ts b/TypeScript/18CustomItemService/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/18CustomItemService/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/18CustomItemService/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts +++ b/TypeScript/18CustomItemService/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/18CustomItemService/types/services/TraderServicesService.d.ts b/TypeScript/18CustomItemService/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/18CustomItemService/types/services/TraderServicesService.d.ts +++ b/TypeScript/18CustomItemService/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/18CustomItemService/types/services/mod/CustomItemService.d.ts b/TypeScript/18CustomItemService/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/18CustomItemService/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/18CustomItemService/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/18CustomItemService/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/18CustomItemService/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/18CustomItemService/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/18CustomItemService/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts b/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts +++ b/TypeScript/18CustomItemService/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/18CustomItemService/types/utils/RandomUtil.d.ts b/TypeScript/18CustomItemService/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/18CustomItemService/types/utils/RandomUtil.d.ts +++ b/TypeScript/18CustomItemService/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/18CustomItemService/types/utils/cloners/ICloner.d.ts b/TypeScript/18CustomItemService/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/18CustomItemService/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/18CustomItemService/types/utils/cloners/JsonCloner.d.ts b/TypeScript/18CustomItemService/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/18CustomItemService/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/18CustomItemService/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/18CustomItemService/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/18CustomItemService/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/18CustomItemService/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/18CustomItemService/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/18CustomItemService/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/BotCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/GameCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/MatchCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/19UseExternalLibraries/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/19UseExternalLibraries/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/19UseExternalLibraries/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/19UseExternalLibraries/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/19UseExternalLibraries/types/controllers/BuildController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/BuildController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/19UseExternalLibraries/types/controllers/DialogueController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/DialogueController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/19UseExternalLibraries/types/controllers/HealthController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/HealthController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/19UseExternalLibraries/types/controllers/LocationController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/LocationController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/19UseExternalLibraries/types/controllers/QuestController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/QuestController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/19UseExternalLibraries/types/controllers/TradeController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/TradeController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/19UseExternalLibraries/types/controllers/TraderController.d.ts b/TypeScript/19UseExternalLibraries/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/19UseExternalLibraries/types/controllers/TraderController.d.ts +++ b/TypeScript/19UseExternalLibraries/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/19UseExternalLibraries/types/di/Router.d.ts b/TypeScript/19UseExternalLibraries/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/19UseExternalLibraries/types/di/Router.d.ts +++ b/TypeScript/19UseExternalLibraries/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotLootGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/19UseExternalLibraries/types/generators/BotWeaponGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/19UseExternalLibraries/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/19UseExternalLibraries/types/generators/LocationGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/LocationGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/19UseExternalLibraries/types/generators/LootGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/LootGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/19UseExternalLibraries/types/generators/PlayerScavGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/19UseExternalLibraries/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/19UseExternalLibraries/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/19UseExternalLibraries/types/helpers/HandbookHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/19UseExternalLibraries/types/helpers/HideoutHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/19UseExternalLibraries/types/helpers/NotificationSendHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/19UseExternalLibraries/types/helpers/NotifierHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/19UseExternalLibraries/types/helpers/PresetHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/PresetHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/19UseExternalLibraries/types/helpers/ProfileHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RagfairHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RagfairServerHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RepairHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RepairHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/19UseExternalLibraries/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/19UseExternalLibraries/types/helpers/TradeHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/TradeHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/19UseExternalLibraries/types/helpers/TraderAssortHelper.d.ts b/TypeScript/19UseExternalLibraries/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/19UseExternalLibraries/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/19UseExternalLibraries/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/19UseExternalLibraries/types/loaders/BundleLoader.d.ts b/TypeScript/19UseExternalLibraries/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/19UseExternalLibraries/types/loaders/BundleLoader.d.ts +++ b/TypeScript/19UseExternalLibraries/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/IGlobals.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocation.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocationBase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/IServer.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/notifier/INotifier.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/19UseExternalLibraries/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsAid.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsPing.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/BotAmount.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/19UseExternalLibraries/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/DateTime.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/NotificationEventType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/ProfileStatus.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/QuestRewardType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/BotDifficulty.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/19UseExternalLibraries/types/models/enums/BotDifficulty.d.ts rename to TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/Season.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/SideType.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/19UseExternalLibraries/types/models/spt/server/ILocations.d.ts b/TypeScript/19UseExternalLibraries/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/19UseExternalLibraries/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/19UseExternalLibraries/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts b/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/19UseExternalLibraries/types/routers/HttpRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/HttpRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/19UseExternalLibraries/types/routers/ItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/19UseExternalLibraries/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/19UseExternalLibraries/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/19UseExternalLibraries/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/servers/WebSocketServer.d.ts b/TypeScript/19UseExternalLibraries/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/WebSocketServer.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/19UseExternalLibraries/types/servers/http/AkiHttpListener.d.ts b/TypeScript/19UseExternalLibraries/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/19UseExternalLibraries/types/servers/http/IHttpListener.d.ts b/TypeScript/19UseExternalLibraries/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/19UseExternalLibraries/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/19UseExternalLibraries/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/19UseExternalLibraries/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/19UseExternalLibraries/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/19UseExternalLibraries/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/19UseExternalLibraries/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/19UseExternalLibraries/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/19UseExternalLibraries/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/19UseExternalLibraries/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/19UseExternalLibraries/types/services/BotGenerationCacheService.d.ts b/TypeScript/19UseExternalLibraries/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/19UseExternalLibraries/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/19UseExternalLibraries/types/services/BotLootCacheService.d.ts b/TypeScript/19UseExternalLibraries/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/19UseExternalLibraries/types/services/BotLootCacheService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/19UseExternalLibraries/types/services/CustomLocationWaveService.d.ts b/TypeScript/19UseExternalLibraries/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/19UseExternalLibraries/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts b/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts b/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/19UseExternalLibraries/types/services/LocaleService.d.ts b/TypeScript/19UseExternalLibraries/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/19UseExternalLibraries/types/services/LocaleService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/19UseExternalLibraries/types/services/NotificationService.d.ts b/TypeScript/19UseExternalLibraries/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/19UseExternalLibraries/types/services/NotificationService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/19UseExternalLibraries/types/services/OpenZoneService.d.ts b/TypeScript/19UseExternalLibraries/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/19UseExternalLibraries/types/services/OpenZoneService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/19UseExternalLibraries/types/services/ProfileSnapshotService.d.ts b/TypeScript/19UseExternalLibraries/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/19UseExternalLibraries/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/19UseExternalLibraries/types/services/TraderServicesService.d.ts b/TypeScript/19UseExternalLibraries/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/19UseExternalLibraries/types/services/TraderServicesService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/19UseExternalLibraries/types/services/mod/CustomItemService.d.ts b/TypeScript/19UseExternalLibraries/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/19UseExternalLibraries/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/19UseExternalLibraries/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/19UseExternalLibraries/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/19UseExternalLibraries/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/19UseExternalLibraries/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/19UseExternalLibraries/types/utils/JsonUtil.d.ts b/TypeScript/19UseExternalLibraries/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/JsonUtil.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/19UseExternalLibraries/types/utils/RandomUtil.d.ts b/TypeScript/19UseExternalLibraries/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/19UseExternalLibraries/types/utils/RandomUtil.d.ts +++ b/TypeScript/19UseExternalLibraries/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/19UseExternalLibraries/types/utils/cloners/ICloner.d.ts b/TypeScript/19UseExternalLibraries/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/19UseExternalLibraries/types/utils/cloners/JsonCloner.d.ts b/TypeScript/19UseExternalLibraries/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/19UseExternalLibraries/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/19UseExternalLibraries/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/19UseExternalLibraries/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/19UseExternalLibraries/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/19UseExternalLibraries/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/1LogToConsole/package.json b/TypeScript/1LogToConsole/package.json index dd2d874..d9875ce 100644 --- a/TypeScript/1LogToConsole/package.json +++ b/TypeScript/1LogToConsole/package.json @@ -4,7 +4,7 @@ "main": "src/mod.js", "license": "MIT", "author": "Chomp", - "akiVersion": "~3.8", + "akiVersion": "~3.9", "loadBefore": [], "loadAfter": [], "incompatibilities": [], diff --git a/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/1LogToConsole/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/1LogToConsole/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/1LogToConsole/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/1LogToConsole/types/controllers/BotController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/1LogToConsole/types/controllers/BuildController.d.ts b/TypeScript/1LogToConsole/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/1LogToConsole/types/controllers/BuildController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts b/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/1LogToConsole/types/controllers/GameController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts b/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts b/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts b/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/1LogToConsole/types/controllers/TraderController.d.ts b/TypeScript/1LogToConsole/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/1LogToConsole/types/controllers/TraderController.d.ts +++ b/TypeScript/1LogToConsole/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/1LogToConsole/types/di/Router.d.ts b/TypeScript/1LogToConsole/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/1LogToConsole/types/di/Router.d.ts +++ b/TypeScript/1LogToConsole/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/1LogToConsole/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/1LogToConsole/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/1LogToConsole/types/generators/LootGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/1LogToConsole/types/generators/LootGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/1LogToConsole/types/generators/PlayerScavGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/1LogToConsole/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/1LogToConsole/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/1LogToConsole/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/1LogToConsole/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/1LogToConsole/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts b/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/1LogToConsole/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/1LogToConsole/types/helpers/HandbookHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/1LogToConsole/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/1LogToConsole/types/helpers/RagfairServerHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/1LogToConsole/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/1LogToConsole/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/1LogToConsole/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/1LogToConsole/types/helpers/TradeHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/1LogToConsole/types/helpers/TradeHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/1LogToConsole/types/helpers/TraderAssortHelper.d.ts b/TypeScript/1LogToConsole/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/1LogToConsole/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/1LogToConsole/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/1LogToConsole/types/loaders/BundleLoader.d.ts b/TypeScript/1LogToConsole/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/1LogToConsole/types/loaders/BundleLoader.d.ts +++ b/TypeScript/1LogToConsole/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/common/ILocation.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/common/ILocationBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/1LogToConsole/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/1LogToConsole/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/1LogToConsole/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/IServer.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/1LogToConsole/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/1LogToConsole/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/1LogToConsole/types/models/eft/notifier/INotifier.d.ts b/TypeScript/1LogToConsole/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/1LogToConsole/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/1LogToConsole/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/1LogToConsole/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/1LogToConsole/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/1LogToConsole/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/1LogToConsole/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/1LogToConsole/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/1LogToConsole/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsAid.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsPing.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/1LogToConsole/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/1LogToConsole/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/1LogToConsole/types/models/enums/BotAmount.d.ts b/TypeScript/1LogToConsole/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/1LogToConsole/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/1LogToConsole/types/models/enums/DateTime.d.ts b/TypeScript/1LogToConsole/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/NotificationEventType.d.ts b/TypeScript/1LogToConsole/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/1LogToConsole/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/ProfileStatus.d.ts b/TypeScript/1LogToConsole/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/QuestRewardType.d.ts b/TypeScript/1LogToConsole/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/1LogToConsole/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/1LogToConsole/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/BotDifficulty.d.ts b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/1LogToConsole/types/models/enums/BotDifficulty.d.ts rename to TypeScript/1LogToConsole/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/Season.d.ts b/TypeScript/1LogToConsole/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/1LogToConsole/types/models/enums/SideType.d.ts b/TypeScript/1LogToConsole/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/1LogToConsole/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/1LogToConsole/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/1LogToConsole/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/1LogToConsole/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/1LogToConsole/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/1LogToConsole/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/1LogToConsole/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/1LogToConsole/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/1LogToConsole/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/1LogToConsole/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/1LogToConsole/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/1LogToConsole/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/1LogToConsole/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/1LogToConsole/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/1LogToConsole/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/1LogToConsole/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/1LogToConsole/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/1LogToConsole/types/models/spt/server/ILocations.d.ts b/TypeScript/1LogToConsole/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/1LogToConsole/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/1LogToConsole/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts b/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/1LogToConsole/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/1LogToConsole/types/routers/HttpRouter.d.ts b/TypeScript/1LogToConsole/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/1LogToConsole/types/routers/HttpRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/1LogToConsole/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/1LogToConsole/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/1LogToConsole/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/1LogToConsole/types/servers/WebSocketServer.d.ts b/TypeScript/1LogToConsole/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/1LogToConsole/types/servers/WebSocketServer.d.ts +++ b/TypeScript/1LogToConsole/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/1LogToConsole/types/servers/http/AkiHttpListener.d.ts b/TypeScript/1LogToConsole/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/1LogToConsole/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/1LogToConsole/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/1LogToConsole/types/servers/http/IHttpListener.d.ts b/TypeScript/1LogToConsole/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/1LogToConsole/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/1LogToConsole/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/1LogToConsole/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/1LogToConsole/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/1LogToConsole/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/1LogToConsole/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/1LogToConsole/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/1LogToConsole/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/1LogToConsole/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/1LogToConsole/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/1LogToConsole/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/1LogToConsole/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/1LogToConsole/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/1LogToConsole/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/1LogToConsole/types/services/BotGenerationCacheService.d.ts b/TypeScript/1LogToConsole/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/1LogToConsole/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/1LogToConsole/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/1LogToConsole/types/services/BotLootCacheService.d.ts b/TypeScript/1LogToConsole/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/1LogToConsole/types/services/BotLootCacheService.d.ts +++ b/TypeScript/1LogToConsole/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/1LogToConsole/types/services/CustomLocationWaveService.d.ts b/TypeScript/1LogToConsole/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/1LogToConsole/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/1LogToConsole/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/1LogToConsole/types/services/FenceService.d.ts b/TypeScript/1LogToConsole/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/1LogToConsole/types/services/FenceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts +++ b/TypeScript/1LogToConsole/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/1LogToConsole/types/services/LocaleService.d.ts b/TypeScript/1LogToConsole/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/1LogToConsole/types/services/LocaleService.d.ts +++ b/TypeScript/1LogToConsole/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/1LogToConsole/types/services/NotificationService.d.ts b/TypeScript/1LogToConsole/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/1LogToConsole/types/services/NotificationService.d.ts +++ b/TypeScript/1LogToConsole/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/1LogToConsole/types/services/OpenZoneService.d.ts b/TypeScript/1LogToConsole/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/1LogToConsole/types/services/OpenZoneService.d.ts +++ b/TypeScript/1LogToConsole/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/1LogToConsole/types/services/ProfileSnapshotService.d.ts b/TypeScript/1LogToConsole/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/1LogToConsole/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/1LogToConsole/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts +++ b/TypeScript/1LogToConsole/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/1LogToConsole/types/services/TraderServicesService.d.ts b/TypeScript/1LogToConsole/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/1LogToConsole/types/services/TraderServicesService.d.ts +++ b/TypeScript/1LogToConsole/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/1LogToConsole/types/services/mod/CustomItemService.d.ts b/TypeScript/1LogToConsole/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/1LogToConsole/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/1LogToConsole/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/1LogToConsole/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/1LogToConsole/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/1LogToConsole/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/1LogToConsole/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts b/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts b/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts +++ b/TypeScript/1LogToConsole/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/1LogToConsole/types/utils/cloners/ICloner.d.ts b/TypeScript/1LogToConsole/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/1LogToConsole/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/1LogToConsole/types/utils/cloners/JsonCloner.d.ts b/TypeScript/1LogToConsole/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/1LogToConsole/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/1LogToConsole/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/1LogToConsole/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/1LogToConsole/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/1LogToConsole/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/1LogToConsole/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/1LogToConsole/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/20CustomChatBot/types/callbacks/BotCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/20CustomChatBot/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/20CustomChatBot/types/callbacks/GameCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/20CustomChatBot/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/20CustomChatBot/types/callbacks/MatchCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/20CustomChatBot/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/20CustomChatBot/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/20CustomChatBot/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/20CustomChatBot/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts b/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/20CustomChatBot/types/controllers/BuildController.d.ts b/TypeScript/20CustomChatBot/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/20CustomChatBot/types/controllers/BuildController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/20CustomChatBot/types/controllers/DialogueController.d.ts b/TypeScript/20CustomChatBot/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/20CustomChatBot/types/controllers/DialogueController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts b/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/20CustomChatBot/types/controllers/HealthController.d.ts b/TypeScript/20CustomChatBot/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/20CustomChatBot/types/controllers/HealthController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/20CustomChatBot/types/controllers/HideoutController.d.ts b/TypeScript/20CustomChatBot/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/20CustomChatBot/types/controllers/HideoutController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/20CustomChatBot/types/controllers/InventoryController.d.ts b/TypeScript/20CustomChatBot/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/20CustomChatBot/types/controllers/InventoryController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/20CustomChatBot/types/controllers/LocationController.d.ts b/TypeScript/20CustomChatBot/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/20CustomChatBot/types/controllers/LocationController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts b/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/20CustomChatBot/types/controllers/QuestController.d.ts b/TypeScript/20CustomChatBot/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/20CustomChatBot/types/controllers/QuestController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/20CustomChatBot/types/controllers/RepeatableQuestController.d.ts b/TypeScript/20CustomChatBot/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/20CustomChatBot/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/20CustomChatBot/types/controllers/TradeController.d.ts b/TypeScript/20CustomChatBot/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/20CustomChatBot/types/controllers/TradeController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/20CustomChatBot/types/controllers/TraderController.d.ts b/TypeScript/20CustomChatBot/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/20CustomChatBot/types/controllers/TraderController.d.ts +++ b/TypeScript/20CustomChatBot/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/20CustomChatBot/types/di/Router.d.ts b/TypeScript/20CustomChatBot/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/20CustomChatBot/types/di/Router.d.ts +++ b/TypeScript/20CustomChatBot/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/20CustomChatBot/types/generators/BotLootGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/20CustomChatBot/types/generators/BotWeaponGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/20CustomChatBot/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/20CustomChatBot/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/20CustomChatBot/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/20CustomChatBot/types/generators/LocationGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/20CustomChatBot/types/generators/LocationGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/20CustomChatBot/types/generators/LootGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/20CustomChatBot/types/generators/LootGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/20CustomChatBot/types/generators/PlayerScavGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/20CustomChatBot/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/20CustomChatBot/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/20CustomChatBot/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/20CustomChatBot/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/20CustomChatBot/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts b/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/20CustomChatBot/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/20CustomChatBot/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/20CustomChatBot/types/helpers/HandbookHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/20CustomChatBot/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/20CustomChatBot/types/helpers/HideoutHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/20CustomChatBot/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/20CustomChatBot/types/helpers/NotificationSendHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/20CustomChatBot/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/20CustomChatBot/types/helpers/NotifierHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/20CustomChatBot/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/20CustomChatBot/types/helpers/PresetHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/20CustomChatBot/types/helpers/PresetHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/20CustomChatBot/types/helpers/ProfileHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/20CustomChatBot/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/20CustomChatBot/types/helpers/RagfairHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/20CustomChatBot/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/20CustomChatBot/types/helpers/RagfairServerHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/20CustomChatBot/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/20CustomChatBot/types/helpers/RepairHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/20CustomChatBot/types/helpers/RepairHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/20CustomChatBot/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/20CustomChatBot/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/20CustomChatBot/types/helpers/TradeHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/20CustomChatBot/types/helpers/TradeHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/20CustomChatBot/types/helpers/TraderAssortHelper.d.ts b/TypeScript/20CustomChatBot/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/20CustomChatBot/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/20CustomChatBot/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/20CustomChatBot/types/loaders/BundleLoader.d.ts b/TypeScript/20CustomChatBot/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/20CustomChatBot/types/loaders/BundleLoader.d.ts +++ b/TypeScript/20CustomChatBot/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/IGlobals.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/ILocation.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/ILocationBase.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/20CustomChatBot/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/20CustomChatBot/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/IServer.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/20CustomChatBot/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/20CustomChatBot/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/notifier/INotifier.d.ts b/TypeScript/20CustomChatBot/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/20CustomChatBot/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/20CustomChatBot/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/20CustomChatBot/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/20CustomChatBot/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/20CustomChatBot/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/20CustomChatBot/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsAid.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsPing.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/20CustomChatBot/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/BotAmount.d.ts b/TypeScript/20CustomChatBot/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/20CustomChatBot/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/20CustomChatBot/types/models/enums/DateTime.d.ts b/TypeScript/20CustomChatBot/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/NotificationEventType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/20CustomChatBot/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/ProfileStatus.d.ts b/TypeScript/20CustomChatBot/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/QuestRewardType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/BotDifficulty.d.ts b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/20CustomChatBot/types/models/enums/BotDifficulty.d.ts rename to TypeScript/20CustomChatBot/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/Season.d.ts b/TypeScript/20CustomChatBot/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/SideType.d.ts b/TypeScript/20CustomChatBot/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/20CustomChatBot/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/20CustomChatBot/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/20CustomChatBot/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/20CustomChatBot/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/20CustomChatBot/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/20CustomChatBot/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/20CustomChatBot/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/20CustomChatBot/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/20CustomChatBot/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/20CustomChatBot/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/20CustomChatBot/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/20CustomChatBot/types/models/spt/server/ILocations.d.ts b/TypeScript/20CustomChatBot/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/20CustomChatBot/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/20CustomChatBot/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/20CustomChatBot/types/routers/EventOutputHolder.d.ts b/TypeScript/20CustomChatBot/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/20CustomChatBot/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/20CustomChatBot/types/routers/HttpRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/20CustomChatBot/types/routers/HttpRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/20CustomChatBot/types/routers/ItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/20CustomChatBot/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/20CustomChatBot/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/20CustomChatBot/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/20CustomChatBot/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/20CustomChatBot/types/servers/WebSocketServer.d.ts b/TypeScript/20CustomChatBot/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/20CustomChatBot/types/servers/WebSocketServer.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/20CustomChatBot/types/servers/http/AkiHttpListener.d.ts b/TypeScript/20CustomChatBot/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/20CustomChatBot/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/20CustomChatBot/types/servers/http/IHttpListener.d.ts b/TypeScript/20CustomChatBot/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/20CustomChatBot/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/20CustomChatBot/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/20CustomChatBot/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/20CustomChatBot/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/20CustomChatBot/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/20CustomChatBot/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/20CustomChatBot/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/20CustomChatBot/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/20CustomChatBot/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/20CustomChatBot/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/20CustomChatBot/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/20CustomChatBot/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/20CustomChatBot/types/services/BotGenerationCacheService.d.ts b/TypeScript/20CustomChatBot/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/20CustomChatBot/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/20CustomChatBot/types/services/BotLootCacheService.d.ts b/TypeScript/20CustomChatBot/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/20CustomChatBot/types/services/BotLootCacheService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/20CustomChatBot/types/services/CustomLocationWaveService.d.ts b/TypeScript/20CustomChatBot/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/20CustomChatBot/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/20CustomChatBot/types/services/FenceService.d.ts b/TypeScript/20CustomChatBot/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/20CustomChatBot/types/services/FenceService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts b/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/20CustomChatBot/types/services/LocaleService.d.ts b/TypeScript/20CustomChatBot/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/20CustomChatBot/types/services/LocaleService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/20CustomChatBot/types/services/NotificationService.d.ts b/TypeScript/20CustomChatBot/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/20CustomChatBot/types/services/NotificationService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/20CustomChatBot/types/services/OpenZoneService.d.ts b/TypeScript/20CustomChatBot/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/20CustomChatBot/types/services/OpenZoneService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/20CustomChatBot/types/services/ProfileSnapshotService.d.ts b/TypeScript/20CustomChatBot/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/20CustomChatBot/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/20CustomChatBot/types/services/TraderServicesService.d.ts b/TypeScript/20CustomChatBot/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/20CustomChatBot/types/services/TraderServicesService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/20CustomChatBot/types/services/mod/CustomItemService.d.ts b/TypeScript/20CustomChatBot/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/20CustomChatBot/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/20CustomChatBot/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/20CustomChatBot/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/20CustomChatBot/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/20CustomChatBot/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/20CustomChatBot/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/20CustomChatBot/types/utils/JsonUtil.d.ts b/TypeScript/20CustomChatBot/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/20CustomChatBot/types/utils/JsonUtil.d.ts +++ b/TypeScript/20CustomChatBot/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/20CustomChatBot/types/utils/RandomUtil.d.ts b/TypeScript/20CustomChatBot/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/20CustomChatBot/types/utils/RandomUtil.d.ts +++ b/TypeScript/20CustomChatBot/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/20CustomChatBot/types/utils/cloners/ICloner.d.ts b/TypeScript/20CustomChatBot/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/20CustomChatBot/types/utils/cloners/JsonCloner.d.ts b/TypeScript/20CustomChatBot/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/20CustomChatBot/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/20CustomChatBot/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/20CustomChatBot/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/20CustomChatBot/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/20CustomChatBot/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/20CustomChatBot/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/BotCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/GameCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/MatchCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/21CustomCommandoCommand/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/21CustomCommandoCommand/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/21CustomCommandoCommand/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/BuildController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/BuildController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/DialogueController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/DialogueController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/HealthController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/HealthController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/HideoutController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/HideoutController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/InventoryController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/InventoryController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/LocationController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/LocationController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/QuestController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/QuestController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/RepeatableQuestController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/TradeController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/TradeController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/21CustomCommandoCommand/types/controllers/TraderController.d.ts b/TypeScript/21CustomCommandoCommand/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/21CustomCommandoCommand/types/controllers/TraderController.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/21CustomCommandoCommand/types/di/Router.d.ts b/TypeScript/21CustomCommandoCommand/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/21CustomCommandoCommand/types/di/Router.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotLootGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/21CustomCommandoCommand/types/generators/BotWeaponGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/21CustomCommandoCommand/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/21CustomCommandoCommand/types/generators/LocationGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/LocationGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/21CustomCommandoCommand/types/generators/LootGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/LootGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/21CustomCommandoCommand/types/generators/PlayerScavGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/HandbookHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/HideoutHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/NotificationSendHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/NotifierHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/PresetHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/PresetHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/ProfileHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairServerHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/RepairHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/RepairHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/TradeHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/TradeHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/21CustomCommandoCommand/types/helpers/TraderAssortHelper.d.ts b/TypeScript/21CustomCommandoCommand/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/21CustomCommandoCommand/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/21CustomCommandoCommand/types/loaders/BundleLoader.d.ts b/TypeScript/21CustomCommandoCommand/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/21CustomCommandoCommand/types/loaders/BundleLoader.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/IGlobals.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocation.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocationBase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/IServer.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/notifier/INotifier.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsAid.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsPing.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/BotAmount.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/DateTime.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/NotificationEventType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/ProfileStatus.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/QuestRewardType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/BotDifficulty.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/21CustomCommandoCommand/types/models/enums/BotDifficulty.d.ts rename to TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/Season.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/SideType.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/21CustomCommandoCommand/types/models/spt/server/ILocations.d.ts b/TypeScript/21CustomCommandoCommand/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/21CustomCommandoCommand/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/EventOutputHolder.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/21CustomCommandoCommand/types/routers/HttpRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/HttpRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/21CustomCommandoCommand/types/routers/ItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/21CustomCommandoCommand/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/21CustomCommandoCommand/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/servers/WebSocketServer.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/WebSocketServer.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/21CustomCommandoCommand/types/servers/http/AkiHttpListener.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/21CustomCommandoCommand/types/servers/http/IHttpListener.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/21CustomCommandoCommand/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/21CustomCommandoCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/21CustomCommandoCommand/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/21CustomCommandoCommand/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/21CustomCommandoCommand/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/21CustomCommandoCommand/types/services/BotGenerationCacheService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/21CustomCommandoCommand/types/services/BotLootCacheService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/BotLootCacheService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/21CustomCommandoCommand/types/services/CustomLocationWaveService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/21CustomCommandoCommand/types/services/LocaleService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/LocaleService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/NotificationService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/NotificationService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/21CustomCommandoCommand/types/services/OpenZoneService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/OpenZoneService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/21CustomCommandoCommand/types/services/ProfileSnapshotService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/21CustomCommandoCommand/types/services/TraderServicesService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/TraderServicesService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/21CustomCommandoCommand/types/services/mod/CustomItemService.d.ts b/TypeScript/21CustomCommandoCommand/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/21CustomCommandoCommand/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/21CustomCommandoCommand/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/21CustomCommandoCommand/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/21CustomCommandoCommand/types/utils/JsonUtil.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/21CustomCommandoCommand/types/utils/JsonUtil.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/21CustomCommandoCommand/types/utils/RandomUtil.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/21CustomCommandoCommand/types/utils/RandomUtil.d.ts +++ b/TypeScript/21CustomCommandoCommand/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/21CustomCommandoCommand/types/utils/cloners/ICloner.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/21CustomCommandoCommand/types/utils/cloners/JsonCloner.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/21CustomCommandoCommand/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/21CustomCommandoCommand/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/21CustomCommandoCommand/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/21CustomCommandoCommand/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/22CustomAkiCommand/types/callbacks/BotCallbacks.d.ts b/TypeScript/22CustomAkiCommand/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/22CustomAkiCommand/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/22CustomAkiCommand/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/22CustomAkiCommand/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/22CustomAkiCommand/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/22CustomAkiCommand/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/22CustomAkiCommand/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/22CustomAkiCommand/types/callbacks/GameCallbacks.d.ts b/TypeScript/22CustomAkiCommand/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/22CustomAkiCommand/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/22CustomAkiCommand/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/22CustomAkiCommand/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/22CustomAkiCommand/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/22CustomAkiCommand/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/22CustomAkiCommand/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/22CustomAkiCommand/types/callbacks/MatchCallbacks.d.ts b/TypeScript/22CustomAkiCommand/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/22CustomAkiCommand/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/22CustomAkiCommand/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/22CustomAkiCommand/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/22CustomAkiCommand/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/22CustomAkiCommand/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/22CustomAkiCommand/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/22CustomAkiCommand/types/controllers/BuildController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/BuildController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/22CustomAkiCommand/types/controllers/DialogueController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/DialogueController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/22CustomAkiCommand/types/controllers/GameController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/GameController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/22CustomAkiCommand/types/controllers/HealthController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/HealthController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/22CustomAkiCommand/types/controllers/HideoutController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/HideoutController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/22CustomAkiCommand/types/controllers/InsuranceController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/InsuranceController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/22CustomAkiCommand/types/controllers/InventoryController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/InventoryController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/22CustomAkiCommand/types/controllers/LocationController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/LocationController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/22CustomAkiCommand/types/controllers/MatchController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/MatchController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/22CustomAkiCommand/types/controllers/QuestController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/QuestController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/22CustomAkiCommand/types/controllers/RepeatableQuestController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/22CustomAkiCommand/types/controllers/TradeController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/TradeController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/22CustomAkiCommand/types/controllers/TraderController.d.ts b/TypeScript/22CustomAkiCommand/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/22CustomAkiCommand/types/controllers/TraderController.d.ts +++ b/TypeScript/22CustomAkiCommand/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/22CustomAkiCommand/types/di/Router.d.ts b/TypeScript/22CustomAkiCommand/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/22CustomAkiCommand/types/di/Router.d.ts +++ b/TypeScript/22CustomAkiCommand/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/22CustomAkiCommand/types/generators/BotGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/BotGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/22CustomAkiCommand/types/generators/BotLevelGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/22CustomAkiCommand/types/generators/BotLootGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/22CustomAkiCommand/types/generators/BotWeaponGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/22CustomAkiCommand/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/22CustomAkiCommand/types/generators/LocationGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/LocationGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/22CustomAkiCommand/types/generators/LootGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/LootGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/22CustomAkiCommand/types/generators/PlayerScavGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/22CustomAkiCommand/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/22CustomAkiCommand/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/22CustomAkiCommand/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/22CustomAkiCommand/types/generators/WeatherGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/22CustomAkiCommand/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/22CustomAkiCommand/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/22CustomAkiCommand/types/helpers/BotHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/BotHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/22CustomAkiCommand/types/helpers/HandbookHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/22CustomAkiCommand/types/helpers/HealthHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/HealthHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/22CustomAkiCommand/types/helpers/HideoutHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/22CustomAkiCommand/types/helpers/InRaidHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/22CustomAkiCommand/types/helpers/InventoryHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/22CustomAkiCommand/types/helpers/NotificationSendHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/22CustomAkiCommand/types/helpers/NotifierHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/22CustomAkiCommand/types/helpers/PresetHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/PresetHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/22CustomAkiCommand/types/helpers/ProfileHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/22CustomAkiCommand/types/helpers/QuestHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/QuestHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/22CustomAkiCommand/types/helpers/RagfairHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/22CustomAkiCommand/types/helpers/RagfairServerHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/22CustomAkiCommand/types/helpers/RepairHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/RepairHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/22CustomAkiCommand/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/22CustomAkiCommand/types/helpers/TradeHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/TradeHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/22CustomAkiCommand/types/helpers/TraderAssortHelper.d.ts b/TypeScript/22CustomAkiCommand/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/22CustomAkiCommand/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/22CustomAkiCommand/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/22CustomAkiCommand/types/loaders/BundleLoader.d.ts b/TypeScript/22CustomAkiCommand/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/22CustomAkiCommand/types/loaders/BundleLoader.d.ts +++ b/TypeScript/22CustomAkiCommand/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/IGlobals.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocation.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocationBase.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IBotBase.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IBotBase.d.ts index c7c7c94..bf7aa6c 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/ITemplateItem.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/ITemplateItem.d.ts index 2ccecbe..0871d1a 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/IServer.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/notifier/INotifier.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/22CustomAkiCommand/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsAid.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsPing.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/BotAmount.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/22CustomAkiCommand/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/DateTime.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/NotificationEventType.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/ProfileStatus.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/QuestRewardType.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/22CustomAkiCommand/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/BotDifficulty.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/22CustomAkiCommand/types/models/enums/BotDifficulty.d.ts rename to TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/Season.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/SideType.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/22CustomAkiCommand/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/22CustomAkiCommand/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/22CustomAkiCommand/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/22CustomAkiCommand/types/models/spt/server/ILocations.d.ts b/TypeScript/22CustomAkiCommand/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/22CustomAkiCommand/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/22CustomAkiCommand/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/EventOutputHolder.d.ts b/TypeScript/22CustomAkiCommand/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/22CustomAkiCommand/types/routers/HttpRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/HttpRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/22CustomAkiCommand/types/routers/ItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/22CustomAkiCommand/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/22CustomAkiCommand/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/22CustomAkiCommand/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/servers/WebSocketServer.d.ts b/TypeScript/22CustomAkiCommand/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/22CustomAkiCommand/types/servers/WebSocketServer.d.ts +++ b/TypeScript/22CustomAkiCommand/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/22CustomAkiCommand/types/servers/http/AkiHttpListener.d.ts b/TypeScript/22CustomAkiCommand/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/22CustomAkiCommand/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/22CustomAkiCommand/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/22CustomAkiCommand/types/servers/http/IHttpListener.d.ts b/TypeScript/22CustomAkiCommand/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/22CustomAkiCommand/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/22CustomAkiCommand/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/22CustomAkiCommand/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/22CustomAkiCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/22CustomAkiCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/22CustomAkiCommand/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/22CustomAkiCommand/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/22CustomAkiCommand/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/22CustomAkiCommand/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/22CustomAkiCommand/types/services/BotGenerationCacheService.d.ts b/TypeScript/22CustomAkiCommand/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/22CustomAkiCommand/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/22CustomAkiCommand/types/services/BotLootCacheService.d.ts b/TypeScript/22CustomAkiCommand/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/22CustomAkiCommand/types/services/BotLootCacheService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/22CustomAkiCommand/types/services/CustomLocationWaveService.d.ts b/TypeScript/22CustomAkiCommand/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/22CustomAkiCommand/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts b/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/22CustomAkiCommand/types/services/InsuranceService.d.ts b/TypeScript/22CustomAkiCommand/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/22CustomAkiCommand/types/services/InsuranceService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/22CustomAkiCommand/types/services/LocaleService.d.ts b/TypeScript/22CustomAkiCommand/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/22CustomAkiCommand/types/services/LocaleService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/22CustomAkiCommand/types/services/NotificationService.d.ts b/TypeScript/22CustomAkiCommand/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/22CustomAkiCommand/types/services/NotificationService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/22CustomAkiCommand/types/services/OpenZoneService.d.ts b/TypeScript/22CustomAkiCommand/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/22CustomAkiCommand/types/services/OpenZoneService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/22CustomAkiCommand/types/services/ProfileFixerService.d.ts b/TypeScript/22CustomAkiCommand/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/22CustomAkiCommand/types/services/ProfileFixerService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/22CustomAkiCommand/types/services/ProfileSnapshotService.d.ts b/TypeScript/22CustomAkiCommand/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/22CustomAkiCommand/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/22CustomAkiCommand/types/services/SeasonalEventService.d.ts b/TypeScript/22CustomAkiCommand/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/22CustomAkiCommand/types/services/SeasonalEventService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/22CustomAkiCommand/types/services/TraderServicesService.d.ts b/TypeScript/22CustomAkiCommand/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/22CustomAkiCommand/types/services/TraderServicesService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/22CustomAkiCommand/types/services/mod/CustomItemService.d.ts b/TypeScript/22CustomAkiCommand/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/22CustomAkiCommand/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/22CustomAkiCommand/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/22CustomAkiCommand/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/22CustomAkiCommand/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/22CustomAkiCommand/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/22CustomAkiCommand/types/utils/JsonUtil.d.ts b/TypeScript/22CustomAkiCommand/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/22CustomAkiCommand/types/utils/JsonUtil.d.ts +++ b/TypeScript/22CustomAkiCommand/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/22CustomAkiCommand/types/utils/RandomUtil.d.ts b/TypeScript/22CustomAkiCommand/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/22CustomAkiCommand/types/utils/RandomUtil.d.ts +++ b/TypeScript/22CustomAkiCommand/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/22CustomAkiCommand/types/utils/cloners/ICloner.d.ts b/TypeScript/22CustomAkiCommand/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/22CustomAkiCommand/types/utils/cloners/JsonCloner.d.ts b/TypeScript/22CustomAkiCommand/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/22CustomAkiCommand/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/22CustomAkiCommand/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/22CustomAkiCommand/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/22CustomAkiCommand/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/22CustomAkiCommand/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/2EditDatabase/types/callbacks/BotCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/2EditDatabase/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/2EditDatabase/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/2EditDatabase/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/2EditDatabase/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/2EditDatabase/types/controllers/BotController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/2EditDatabase/types/controllers/BuildController.d.ts b/TypeScript/2EditDatabase/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/2EditDatabase/types/controllers/BuildController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts b/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/2EditDatabase/types/controllers/GameController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts b/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts b/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts b/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts b/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts b/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/2EditDatabase/types/controllers/TraderController.d.ts b/TypeScript/2EditDatabase/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/2EditDatabase/types/controllers/TraderController.d.ts +++ b/TypeScript/2EditDatabase/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/2EditDatabase/types/di/Router.d.ts b/TypeScript/2EditDatabase/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/2EditDatabase/types/di/Router.d.ts +++ b/TypeScript/2EditDatabase/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/2EditDatabase/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/2EditDatabase/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/2EditDatabase/types/generators/LootGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/2EditDatabase/types/generators/LootGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/2EditDatabase/types/generators/PlayerScavGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/2EditDatabase/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/2EditDatabase/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/2EditDatabase/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/2EditDatabase/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/2EditDatabase/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts b/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/2EditDatabase/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/2EditDatabase/types/helpers/HandbookHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/2EditDatabase/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/2EditDatabase/types/helpers/RagfairServerHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/2EditDatabase/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/2EditDatabase/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/2EditDatabase/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/2EditDatabase/types/helpers/TraderAssortHelper.d.ts b/TypeScript/2EditDatabase/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/2EditDatabase/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/2EditDatabase/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/2EditDatabase/types/loaders/BundleLoader.d.ts b/TypeScript/2EditDatabase/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/2EditDatabase/types/loaders/BundleLoader.d.ts +++ b/TypeScript/2EditDatabase/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/common/ILocation.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/2EditDatabase/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/2EditDatabase/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/2EditDatabase/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/IServer.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/2EditDatabase/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/2EditDatabase/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/2EditDatabase/types/models/eft/notifier/INotifier.d.ts b/TypeScript/2EditDatabase/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/2EditDatabase/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/2EditDatabase/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/2EditDatabase/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/2EditDatabase/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/2EditDatabase/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/2EditDatabase/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/2EditDatabase/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/2EditDatabase/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsAid.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsPing.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/2EditDatabase/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/2EditDatabase/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/2EditDatabase/types/models/enums/BotAmount.d.ts b/TypeScript/2EditDatabase/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/2EditDatabase/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/2EditDatabase/types/models/enums/DateTime.d.ts b/TypeScript/2EditDatabase/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/NotificationEventType.d.ts b/TypeScript/2EditDatabase/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/2EditDatabase/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/ProfileStatus.d.ts b/TypeScript/2EditDatabase/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/QuestRewardType.d.ts b/TypeScript/2EditDatabase/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/2EditDatabase/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/2EditDatabase/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/BotDifficulty.d.ts b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/2EditDatabase/types/models/enums/BotDifficulty.d.ts rename to TypeScript/2EditDatabase/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/Season.d.ts b/TypeScript/2EditDatabase/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/2EditDatabase/types/models/enums/SideType.d.ts b/TypeScript/2EditDatabase/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/2EditDatabase/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/2EditDatabase/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/2EditDatabase/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/2EditDatabase/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/2EditDatabase/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/2EditDatabase/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/2EditDatabase/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/2EditDatabase/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/2EditDatabase/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/2EditDatabase/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/2EditDatabase/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/2EditDatabase/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/2EditDatabase/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/2EditDatabase/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/2EditDatabase/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/2EditDatabase/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/2EditDatabase/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/2EditDatabase/types/models/spt/server/ILocations.d.ts b/TypeScript/2EditDatabase/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/2EditDatabase/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/2EditDatabase/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts b/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/2EditDatabase/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/2EditDatabase/types/routers/HttpRouter.d.ts b/TypeScript/2EditDatabase/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/2EditDatabase/types/routers/HttpRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/2EditDatabase/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/2EditDatabase/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/2EditDatabase/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/2EditDatabase/types/servers/WebSocketServer.d.ts b/TypeScript/2EditDatabase/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/2EditDatabase/types/servers/WebSocketServer.d.ts +++ b/TypeScript/2EditDatabase/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/2EditDatabase/types/servers/http/AkiHttpListener.d.ts b/TypeScript/2EditDatabase/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/2EditDatabase/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/2EditDatabase/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/2EditDatabase/types/servers/http/IHttpListener.d.ts b/TypeScript/2EditDatabase/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/2EditDatabase/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/2EditDatabase/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/2EditDatabase/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/2EditDatabase/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/2EditDatabase/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/2EditDatabase/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/2EditDatabase/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/2EditDatabase/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/2EditDatabase/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/2EditDatabase/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/2EditDatabase/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/2EditDatabase/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/2EditDatabase/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/2EditDatabase/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/2EditDatabase/types/services/BotGenerationCacheService.d.ts b/TypeScript/2EditDatabase/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/2EditDatabase/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/2EditDatabase/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/2EditDatabase/types/services/BotLootCacheService.d.ts b/TypeScript/2EditDatabase/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/2EditDatabase/types/services/BotLootCacheService.d.ts +++ b/TypeScript/2EditDatabase/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/2EditDatabase/types/services/CustomLocationWaveService.d.ts b/TypeScript/2EditDatabase/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/2EditDatabase/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/2EditDatabase/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/2EditDatabase/types/services/FenceService.d.ts b/TypeScript/2EditDatabase/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/2EditDatabase/types/services/FenceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts +++ b/TypeScript/2EditDatabase/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/2EditDatabase/types/services/LocaleService.d.ts b/TypeScript/2EditDatabase/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/2EditDatabase/types/services/LocaleService.d.ts +++ b/TypeScript/2EditDatabase/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/2EditDatabase/types/services/NotificationService.d.ts b/TypeScript/2EditDatabase/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/2EditDatabase/types/services/NotificationService.d.ts +++ b/TypeScript/2EditDatabase/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/2EditDatabase/types/services/OpenZoneService.d.ts b/TypeScript/2EditDatabase/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/2EditDatabase/types/services/OpenZoneService.d.ts +++ b/TypeScript/2EditDatabase/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/2EditDatabase/types/services/ProfileSnapshotService.d.ts b/TypeScript/2EditDatabase/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/2EditDatabase/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/2EditDatabase/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts +++ b/TypeScript/2EditDatabase/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/2EditDatabase/types/services/TraderServicesService.d.ts b/TypeScript/2EditDatabase/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/2EditDatabase/types/services/TraderServicesService.d.ts +++ b/TypeScript/2EditDatabase/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/2EditDatabase/types/services/mod/CustomItemService.d.ts b/TypeScript/2EditDatabase/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/2EditDatabase/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/2EditDatabase/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/2EditDatabase/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/2EditDatabase/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/2EditDatabase/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/2EditDatabase/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts b/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts b/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts +++ b/TypeScript/2EditDatabase/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/2EditDatabase/types/utils/cloners/ICloner.d.ts b/TypeScript/2EditDatabase/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/2EditDatabase/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/2EditDatabase/types/utils/cloners/JsonCloner.d.ts b/TypeScript/2EditDatabase/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/2EditDatabase/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/2EditDatabase/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/2EditDatabase/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/2EditDatabase/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/2EditDatabase/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/2EditDatabase/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/2EditDatabase/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/BotCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/3GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/3GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/3GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/3GetSptConfigFile/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/3GetSptConfigFile/types/controllers/BuildController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/BuildController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/3GetSptConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/3GetSptConfigFile/types/controllers/LocationController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/3GetSptConfigFile/types/controllers/TradeController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/TradeController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/3GetSptConfigFile/types/controllers/TraderController.d.ts b/TypeScript/3GetSptConfigFile/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/3GetSptConfigFile/types/controllers/TraderController.d.ts +++ b/TypeScript/3GetSptConfigFile/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/3GetSptConfigFile/types/di/Router.d.ts b/TypeScript/3GetSptConfigFile/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/3GetSptConfigFile/types/di/Router.d.ts +++ b/TypeScript/3GetSptConfigFile/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/3GetSptConfigFile/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/3GetSptConfigFile/types/generators/LocationGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/LocationGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/3GetSptConfigFile/types/generators/LootGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/LootGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/3GetSptConfigFile/types/generators/PlayerScavGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/3GetSptConfigFile/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/3GetSptConfigFile/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HandbookHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/3GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/3GetSptConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/3GetSptConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RagfairServerHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RepairHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RepairHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/3GetSptConfigFile/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/3GetSptConfigFile/types/helpers/TradeHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/TradeHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/3GetSptConfigFile/types/helpers/TraderAssortHelper.d.ts b/TypeScript/3GetSptConfigFile/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/3GetSptConfigFile/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/3GetSptConfigFile/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/3GetSptConfigFile/types/loaders/BundleLoader.d.ts b/TypeScript/3GetSptConfigFile/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/3GetSptConfigFile/types/loaders/BundleLoader.d.ts +++ b/TypeScript/3GetSptConfigFile/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocation.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/IServer.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/notifier/INotifier.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/3GetSptConfigFile/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsAid.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsPing.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/BotAmount.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/3GetSptConfigFile/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/DateTime.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/NotificationEventType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/ProfileStatus.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/QuestRewardType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/BotDifficulty.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/3GetSptConfigFile/types/models/enums/BotDifficulty.d.ts rename to TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/Season.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/SideType.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/3GetSptConfigFile/types/models/spt/server/ILocations.d.ts b/TypeScript/3GetSptConfigFile/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/3GetSptConfigFile/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/3GetSptConfigFile/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/3GetSptConfigFile/types/routers/HttpRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/HttpRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/3GetSptConfigFile/types/routers/ItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/3GetSptConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/3GetSptConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/3GetSptConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/servers/WebSocketServer.d.ts b/TypeScript/3GetSptConfigFile/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/WebSocketServer.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/3GetSptConfigFile/types/servers/http/AkiHttpListener.d.ts b/TypeScript/3GetSptConfigFile/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/3GetSptConfigFile/types/servers/http/IHttpListener.d.ts b/TypeScript/3GetSptConfigFile/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/3GetSptConfigFile/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/3GetSptConfigFile/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/3GetSptConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/3GetSptConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/3GetSptConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/3GetSptConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/3GetSptConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/3GetSptConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/3GetSptConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/3GetSptConfigFile/types/services/BotGenerationCacheService.d.ts b/TypeScript/3GetSptConfigFile/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/3GetSptConfigFile/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/3GetSptConfigFile/types/services/BotLootCacheService.d.ts b/TypeScript/3GetSptConfigFile/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/3GetSptConfigFile/types/services/BotLootCacheService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/3GetSptConfigFile/types/services/CustomLocationWaveService.d.ts b/TypeScript/3GetSptConfigFile/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/3GetSptConfigFile/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/3GetSptConfigFile/types/services/LocaleService.d.ts b/TypeScript/3GetSptConfigFile/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/LocaleService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/3GetSptConfigFile/types/services/NotificationService.d.ts b/TypeScript/3GetSptConfigFile/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/NotificationService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/3GetSptConfigFile/types/services/OpenZoneService.d.ts b/TypeScript/3GetSptConfigFile/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/3GetSptConfigFile/types/services/OpenZoneService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/3GetSptConfigFile/types/services/ProfileSnapshotService.d.ts b/TypeScript/3GetSptConfigFile/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/3GetSptConfigFile/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/3GetSptConfigFile/types/services/TraderServicesService.d.ts b/TypeScript/3GetSptConfigFile/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/3GetSptConfigFile/types/services/TraderServicesService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/3GetSptConfigFile/types/services/mod/CustomItemService.d.ts b/TypeScript/3GetSptConfigFile/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/3GetSptConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/3GetSptConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/3GetSptConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/3GetSptConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/3GetSptConfigFile/types/utils/RandomUtil.d.ts b/TypeScript/3GetSptConfigFile/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/3GetSptConfigFile/types/utils/RandomUtil.d.ts +++ b/TypeScript/3GetSptConfigFile/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/3GetSptConfigFile/types/utils/cloners/ICloner.d.ts b/TypeScript/3GetSptConfigFile/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/3GetSptConfigFile/types/utils/cloners/JsonCloner.d.ts b/TypeScript/3GetSptConfigFile/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/3GetSptConfigFile/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/3GetSptConfigFile/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/3GetSptConfigFile/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/3GetSptConfigFile/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/3GetSptConfigFile/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/BotCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BuildController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BuildController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HealthController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @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 b08f2ef..ccb5c18 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LocationController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/QuestController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/TradeController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/TradeController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/TraderController.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/TraderController.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Router.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Router.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LocationGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LocationGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LootGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LootGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/PlayerScavGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HandbookHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotificationSendHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairServerHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepairHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepairHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TradeHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TradeHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TraderAssortHelper.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/loaders/BundleLoader.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/loaders/BundleLoader.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocation.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 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 @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 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 @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IServer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/notifier/INotifier.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; 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 cae98f1..59a63fc 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsAid.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsPing.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/BotAmount.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/DateTime.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/NotificationEventType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ProfileStatus.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/QuestRewardType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/BotDifficulty.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/BotDifficulty.d.ts rename to TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/Season.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SideType.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } 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 7ea9d7e..2a7a64e 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ 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 f17d3e4..89223b2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } 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 3e8f282..845cb77 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ILocations.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/HttpRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/HttpRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/WebSocketServer.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/WebSocketServer.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/AkiHttpListener.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/IHttpListener.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotGenerationCacheService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotLootCacheService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotLootCacheService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/CustomLocationWaveService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocaleService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocaleService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/NotificationService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/NotificationService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/OpenZoneService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/OpenZoneService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileSnapshotService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderServicesService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderServicesService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/CustomItemService.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/RandomUtil.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/RandomUtil.d.ts +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/ICloner.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/JsonCloner.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/4.1UseACustomJson5OrJsonCConfigFile/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/BuildController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/BuildController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts b/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts b/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/4UseACustomConfigFile/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/4UseACustomConfigFile/types/generators/PlayerScavGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/4UseACustomConfigFile/types/helpers/TraderAssortHelper.d.ts b/TypeScript/4UseACustomConfigFile/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/4UseACustomConfigFile/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts b/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocation.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/IServer.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/notifier/INotifier.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsAid.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsPing.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/BotAmount.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/DateTime.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/NotificationEventType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/ProfileStatus.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/QuestRewardType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/BotDifficulty.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/4UseACustomConfigFile/types/models/enums/BotDifficulty.d.ts rename to TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/Season.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/SideType.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ILocations.d.ts b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/4UseACustomConfigFile/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/4UseACustomConfigFile/types/routers/HttpRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/HttpRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/4UseACustomConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/4UseACustomConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/WebSocketServer.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/WebSocketServer.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/http/AkiHttpListener.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/4UseACustomConfigFile/types/servers/http/IHttpListener.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/4UseACustomConfigFile/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/4UseACustomConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/4UseACustomConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/4UseACustomConfigFile/types/services/BotGenerationCacheService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/4UseACustomConfigFile/types/services/BotLootCacheService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/BotLootCacheService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/4UseACustomConfigFile/types/services/CustomLocationWaveService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/4UseACustomConfigFile/types/services/LocaleService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/LocaleService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/NotificationService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/NotificationService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/4UseACustomConfigFile/types/services/OpenZoneService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/OpenZoneService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/4UseACustomConfigFile/types/services/ProfileSnapshotService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/4UseACustomConfigFile/types/services/TraderServicesService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/TraderServicesService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/4UseACustomConfigFile/types/services/mod/CustomItemService.d.ts b/TypeScript/4UseACustomConfigFile/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/4UseACustomConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/4UseACustomConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/4UseACustomConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts +++ b/TypeScript/4UseACustomConfigFile/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/4UseACustomConfigFile/types/utils/cloners/ICloner.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/4UseACustomConfigFile/types/utils/cloners/JsonCloner.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/4UseACustomConfigFile/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/4UseACustomConfigFile/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/4UseACustomConfigFile/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/4UseACustomConfigFile/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/5ReplaceMethod/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/5ReplaceMethod/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/5ReplaceMethod/types/controllers/BuildController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/BuildController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts b/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts +++ b/TypeScript/5ReplaceMethod/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/5ReplaceMethod/types/di/Router.d.ts b/TypeScript/5ReplaceMethod/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/5ReplaceMethod/types/di/Router.d.ts +++ b/TypeScript/5ReplaceMethod/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/5ReplaceMethod/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/5ReplaceMethod/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/5ReplaceMethod/types/generators/PlayerScavGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/5ReplaceMethod/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/5ReplaceMethod/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/5ReplaceMethod/types/helpers/TraderAssortHelper.d.ts b/TypeScript/5ReplaceMethod/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/5ReplaceMethod/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/5ReplaceMethod/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts b/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts +++ b/TypeScript/5ReplaceMethod/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocation.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/IServer.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/5ReplaceMethod/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/notifier/INotifier.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/5ReplaceMethod/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsAid.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsPing.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/BotAmount.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/5ReplaceMethod/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/DateTime.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/NotificationEventType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/ProfileStatus.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/QuestRewardType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/BotDifficulty.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/5ReplaceMethod/types/models/enums/BotDifficulty.d.ts rename to TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/Season.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/SideType.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/5ReplaceMethod/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/5ReplaceMethod/types/models/spt/server/ILocations.d.ts b/TypeScript/5ReplaceMethod/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/5ReplaceMethod/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/5ReplaceMethod/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts b/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/5ReplaceMethod/types/routers/HttpRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/5ReplaceMethod/types/routers/HttpRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/5ReplaceMethod/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/5ReplaceMethod/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/5ReplaceMethod/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/servers/WebSocketServer.d.ts b/TypeScript/5ReplaceMethod/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/5ReplaceMethod/types/servers/WebSocketServer.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/5ReplaceMethod/types/servers/http/AkiHttpListener.d.ts b/TypeScript/5ReplaceMethod/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/5ReplaceMethod/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/5ReplaceMethod/types/servers/http/IHttpListener.d.ts b/TypeScript/5ReplaceMethod/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/5ReplaceMethod/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/5ReplaceMethod/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/5ReplaceMethod/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/5ReplaceMethod/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/5ReplaceMethod/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/5ReplaceMethod/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/5ReplaceMethod/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/5ReplaceMethod/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/5ReplaceMethod/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/5ReplaceMethod/types/services/BotGenerationCacheService.d.ts b/TypeScript/5ReplaceMethod/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/5ReplaceMethod/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/5ReplaceMethod/types/services/BotLootCacheService.d.ts b/TypeScript/5ReplaceMethod/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/5ReplaceMethod/types/services/BotLootCacheService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/5ReplaceMethod/types/services/CustomLocationWaveService.d.ts b/TypeScript/5ReplaceMethod/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/5ReplaceMethod/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/5ReplaceMethod/types/services/LocaleService.d.ts b/TypeScript/5ReplaceMethod/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/5ReplaceMethod/types/services/LocaleService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/5ReplaceMethod/types/services/NotificationService.d.ts b/TypeScript/5ReplaceMethod/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/5ReplaceMethod/types/services/NotificationService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/5ReplaceMethod/types/services/OpenZoneService.d.ts b/TypeScript/5ReplaceMethod/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/5ReplaceMethod/types/services/OpenZoneService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/5ReplaceMethod/types/services/ProfileSnapshotService.d.ts b/TypeScript/5ReplaceMethod/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/5ReplaceMethod/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/5ReplaceMethod/types/services/TraderServicesService.d.ts b/TypeScript/5ReplaceMethod/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/5ReplaceMethod/types/services/TraderServicesService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/5ReplaceMethod/types/services/mod/CustomItemService.d.ts b/TypeScript/5ReplaceMethod/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/5ReplaceMethod/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/5ReplaceMethod/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/5ReplaceMethod/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/5ReplaceMethod/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/5ReplaceMethod/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts b/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts +++ b/TypeScript/5ReplaceMethod/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/5ReplaceMethod/types/utils/cloners/ICloner.d.ts b/TypeScript/5ReplaceMethod/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/5ReplaceMethod/types/utils/cloners/JsonCloner.d.ts b/TypeScript/5ReplaceMethod/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/5ReplaceMethod/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/5ReplaceMethod/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/5ReplaceMethod/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/5ReplaceMethod/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/5ReplaceMethod/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/BuildController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/BuildController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts b/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts b/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/PlayerScavGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderAssortHelper.d.ts b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/6ReferenceAnotherClass/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts b/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocation.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/notifier/INotifier.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsAid.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsPing.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/BotAmount.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/DateTime.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/NotificationEventType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/ProfileStatus.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestRewardType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/BotDifficulty.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/6ReferenceAnotherClass/types/models/enums/BotDifficulty.d.ts rename to TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/Season.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/SideType.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ILocations.d.ts b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/HttpRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/HttpRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/6ReferenceAnotherClass/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/WebSocketServer.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/WebSocketServer.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/http/AkiHttpListener.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/http/IHttpListener.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/6ReferenceAnotherClass/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/6ReferenceAnotherClass/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/services/BotGenerationCacheService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/6ReferenceAnotherClass/types/services/BotLootCacheService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/BotLootCacheService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/6ReferenceAnotherClass/types/services/CustomLocationWaveService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/6ReferenceAnotherClass/types/services/LocaleService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/LocaleService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/NotificationService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/NotificationService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/6ReferenceAnotherClass/types/services/OpenZoneService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/OpenZoneService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/6ReferenceAnotherClass/types/services/ProfileSnapshotService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/6ReferenceAnotherClass/types/services/TraderServicesService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/TraderServicesService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/6ReferenceAnotherClass/types/services/mod/CustomItemService.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/6ReferenceAnotherClass/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/6ReferenceAnotherClass/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/6ReferenceAnotherClass/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts +++ b/TypeScript/6ReferenceAnotherClass/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/cloners/ICloner.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/cloners/JsonCloner.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/6ReferenceAnotherClass/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/6ReferenceAnotherClass/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/6ReferenceAnotherClass/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/7OnLoadHook/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/7OnLoadHook/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/7OnLoadHook/types/controllers/BuildController.d.ts b/TypeScript/7OnLoadHook/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/7OnLoadHook/types/controllers/BuildController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts b/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts b/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts b/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts b/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts +++ b/TypeScript/7OnLoadHook/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/7OnLoadHook/types/di/Router.d.ts b/TypeScript/7OnLoadHook/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/7OnLoadHook/types/di/Router.d.ts +++ b/TypeScript/7OnLoadHook/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/7OnLoadHook/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/7OnLoadHook/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/7OnLoadHook/types/generators/PlayerScavGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/7OnLoadHook/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/7OnLoadHook/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/7OnLoadHook/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/7OnLoadHook/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/7OnLoadHook/types/helpers/TraderAssortHelper.d.ts b/TypeScript/7OnLoadHook/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/7OnLoadHook/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/7OnLoadHook/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts b/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts +++ b/TypeScript/7OnLoadHook/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/ILocation.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/IServer.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/7OnLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/7OnLoadHook/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/notifier/INotifier.d.ts b/TypeScript/7OnLoadHook/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/7OnLoadHook/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/7OnLoadHook/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/7OnLoadHook/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/7OnLoadHook/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsAid.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsPing.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/7OnLoadHook/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/BotAmount.d.ts b/TypeScript/7OnLoadHook/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/7OnLoadHook/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/7OnLoadHook/types/models/enums/DateTime.d.ts b/TypeScript/7OnLoadHook/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/NotificationEventType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/7OnLoadHook/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/ProfileStatus.d.ts b/TypeScript/7OnLoadHook/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/QuestRewardType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/BotDifficulty.d.ts b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/7OnLoadHook/types/models/enums/BotDifficulty.d.ts rename to TypeScript/7OnLoadHook/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/Season.d.ts b/TypeScript/7OnLoadHook/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/SideType.d.ts b/TypeScript/7OnLoadHook/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/7OnLoadHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/7OnLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/7OnLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/7OnLoadHook/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/7OnLoadHook/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/7OnLoadHook/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/7OnLoadHook/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/7OnLoadHook/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/7OnLoadHook/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/7OnLoadHook/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/7OnLoadHook/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/7OnLoadHook/types/models/spt/server/ILocations.d.ts b/TypeScript/7OnLoadHook/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/7OnLoadHook/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/7OnLoadHook/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts b/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/7OnLoadHook/types/routers/HttpRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/7OnLoadHook/types/routers/HttpRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/7OnLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/7OnLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/7OnLoadHook/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/7OnLoadHook/types/servers/WebSocketServer.d.ts b/TypeScript/7OnLoadHook/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/7OnLoadHook/types/servers/WebSocketServer.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/7OnLoadHook/types/servers/http/AkiHttpListener.d.ts b/TypeScript/7OnLoadHook/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/7OnLoadHook/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/7OnLoadHook/types/servers/http/IHttpListener.d.ts b/TypeScript/7OnLoadHook/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/7OnLoadHook/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/7OnLoadHook/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/7OnLoadHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/7OnLoadHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/7OnLoadHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/7OnLoadHook/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/7OnLoadHook/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/7OnLoadHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/7OnLoadHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/7OnLoadHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/7OnLoadHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/7OnLoadHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/7OnLoadHook/types/services/BotGenerationCacheService.d.ts b/TypeScript/7OnLoadHook/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/7OnLoadHook/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/7OnLoadHook/types/services/BotLootCacheService.d.ts b/TypeScript/7OnLoadHook/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/7OnLoadHook/types/services/BotLootCacheService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/7OnLoadHook/types/services/CustomLocationWaveService.d.ts b/TypeScript/7OnLoadHook/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/7OnLoadHook/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/7OnLoadHook/types/services/FenceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/7OnLoadHook/types/services/LocaleService.d.ts b/TypeScript/7OnLoadHook/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/7OnLoadHook/types/services/LocaleService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/7OnLoadHook/types/services/NotificationService.d.ts b/TypeScript/7OnLoadHook/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/7OnLoadHook/types/services/NotificationService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/7OnLoadHook/types/services/OpenZoneService.d.ts b/TypeScript/7OnLoadHook/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/7OnLoadHook/types/services/OpenZoneService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/7OnLoadHook/types/services/ProfileSnapshotService.d.ts b/TypeScript/7OnLoadHook/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/7OnLoadHook/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/7OnLoadHook/types/services/TraderServicesService.d.ts b/TypeScript/7OnLoadHook/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/7OnLoadHook/types/services/TraderServicesService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/7OnLoadHook/types/services/mod/CustomItemService.d.ts b/TypeScript/7OnLoadHook/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/7OnLoadHook/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/7OnLoadHook/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/7OnLoadHook/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/7OnLoadHook/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/7OnLoadHook/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/7OnLoadHook/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts b/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts +++ b/TypeScript/7OnLoadHook/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/7OnLoadHook/types/utils/cloners/ICloner.d.ts b/TypeScript/7OnLoadHook/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/7OnLoadHook/types/utils/cloners/JsonCloner.d.ts b/TypeScript/7OnLoadHook/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/7OnLoadHook/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/7OnLoadHook/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/7OnLoadHook/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/7OnLoadHook/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/7OnLoadHook/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/7OnLoadHook/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/8OnUpdateHook/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/8OnUpdateHook/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/8OnUpdateHook/types/controllers/BuildController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/BuildController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts b/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts +++ b/TypeScript/8OnUpdateHook/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/8OnUpdateHook/types/di/Router.d.ts b/TypeScript/8OnUpdateHook/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/8OnUpdateHook/types/di/Router.d.ts +++ b/TypeScript/8OnUpdateHook/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/8OnUpdateHook/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/8OnUpdateHook/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/8OnUpdateHook/types/generators/PlayerScavGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/8OnUpdateHook/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/8OnUpdateHook/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/8OnUpdateHook/types/helpers/TraderAssortHelper.d.ts b/TypeScript/8OnUpdateHook/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/8OnUpdateHook/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/8OnUpdateHook/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts b/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts +++ b/TypeScript/8OnUpdateHook/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocation.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/IServer.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/8OnUpdateHook/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/notifier/INotifier.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/8OnUpdateHook/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsAid.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsPing.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/BotAmount.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/8OnUpdateHook/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/DateTime.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/NotificationEventType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/ProfileStatus.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/QuestRewardType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/BotDifficulty.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/8OnUpdateHook/types/models/enums/BotDifficulty.d.ts rename to TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/Season.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/SideType.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/8OnUpdateHook/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/8OnUpdateHook/types/models/spt/server/ILocations.d.ts b/TypeScript/8OnUpdateHook/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/8OnUpdateHook/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/8OnUpdateHook/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts b/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/8OnUpdateHook/types/routers/HttpRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/8OnUpdateHook/types/routers/HttpRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/8OnUpdateHook/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/8OnUpdateHook/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/8OnUpdateHook/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/servers/WebSocketServer.d.ts b/TypeScript/8OnUpdateHook/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/8OnUpdateHook/types/servers/WebSocketServer.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/8OnUpdateHook/types/servers/http/AkiHttpListener.d.ts b/TypeScript/8OnUpdateHook/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/8OnUpdateHook/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/8OnUpdateHook/types/servers/http/IHttpListener.d.ts b/TypeScript/8OnUpdateHook/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/8OnUpdateHook/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/8OnUpdateHook/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/8OnUpdateHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/8OnUpdateHook/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/8OnUpdateHook/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/8OnUpdateHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/8OnUpdateHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/8OnUpdateHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/8OnUpdateHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/8OnUpdateHook/types/services/BotGenerationCacheService.d.ts b/TypeScript/8OnUpdateHook/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/8OnUpdateHook/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/8OnUpdateHook/types/services/BotLootCacheService.d.ts b/TypeScript/8OnUpdateHook/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/8OnUpdateHook/types/services/BotLootCacheService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/8OnUpdateHook/types/services/CustomLocationWaveService.d.ts b/TypeScript/8OnUpdateHook/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/8OnUpdateHook/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/8OnUpdateHook/types/services/LocaleService.d.ts b/TypeScript/8OnUpdateHook/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/8OnUpdateHook/types/services/LocaleService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/8OnUpdateHook/types/services/NotificationService.d.ts b/TypeScript/8OnUpdateHook/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/8OnUpdateHook/types/services/NotificationService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/8OnUpdateHook/types/services/OpenZoneService.d.ts b/TypeScript/8OnUpdateHook/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/8OnUpdateHook/types/services/OpenZoneService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/8OnUpdateHook/types/services/ProfileSnapshotService.d.ts b/TypeScript/8OnUpdateHook/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/8OnUpdateHook/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/8OnUpdateHook/types/services/TraderServicesService.d.ts b/TypeScript/8OnUpdateHook/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/8OnUpdateHook/types/services/TraderServicesService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/8OnUpdateHook/types/services/mod/CustomItemService.d.ts b/TypeScript/8OnUpdateHook/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/8OnUpdateHook/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/8OnUpdateHook/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/8OnUpdateHook/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/8OnUpdateHook/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/8OnUpdateHook/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts b/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts +++ b/TypeScript/8OnUpdateHook/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/8OnUpdateHook/types/utils/cloners/ICloner.d.ts b/TypeScript/8OnUpdateHook/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/8OnUpdateHook/types/utils/cloners/JsonCloner.d.ts b/TypeScript/8OnUpdateHook/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/8OnUpdateHook/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/8OnUpdateHook/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/8OnUpdateHook/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/8OnUpdateHook/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/8OnUpdateHook/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts index 1e7a55e..fd0abfc 100644 --- a/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/BotCallbacks.d.ts @@ -29,7 +29,7 @@ export declare class BotCallbacks { * Handle client/game/bot/generate * @returns IGetBodyResponseData */ - generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): IGetBodyResponseData; + generateBots(url: string, info: IGenerateBotsRequestData, sessionID: string): Promise>; /** * Handle singleplayer/settings/bot/maxCap * @returns string diff --git a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts index 9fcd5ea..f6d3079 100644 --- a/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/DialogueCallbacks.d.ts @@ -3,8 +3,11 @@ import { OnUpdate } from "@spt-aki/di/OnUpdate"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IUIDRequestData } from "@spt-aki/models/eft/common/request/IUIDRequestData"; import { IAcceptFriendRequestData, ICancelFriendRequestData, IDeclineFriendRequestData } from "@spt-aki/models/eft/dialog/IAcceptFriendRequestData"; +import { IAddUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IAddUserGroupMailRequest"; +import { IChangeGroupMailOwnerRequest } from "@spt-aki/models/eft/dialog/IChangeGroupMailOwnerRequest"; import { IChatServer } from "@spt-aki/models/eft/dialog/IChatServer"; import { IClearMailMessageRequest } from "@spt-aki/models/eft/dialog/IClearMailMessageRequest"; +import { ICreateGroupMailRequest } from "@spt-aki/models/eft/dialog/ICreateGroupMailRequest"; import { IDeleteFriendRequest } from "@spt-aki/models/eft/dialog/IDeleteFriendRequest"; import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; @@ -19,6 +22,7 @@ import { IGetMailDialogViewResponseData } from "@spt-aki/models/eft/dialog/IGetM import { IPinDialogRequestData } from "@spt-aki/models/eft/dialog/IPinDialogRequestData"; import { IRemoveDialogRequestData } from "@spt-aki/models/eft/dialog/IRemoveDialogRequestData"; import { IRemoveMailMessageRequest } from "@spt-aki/models/eft/dialog/IRemoveMailMessageRequest"; +import { IRemoveUserGroupMailRequest } from "@spt-aki/models/eft/dialog/IRemoveUserGroupMailRequest"; import { ISendMessageRequest } from "@spt-aki/models/eft/dialog/ISendMessageRequest"; import { ISetDialogReadRequestData } from "@spt-aki/models/eft/dialog/ISetDialogReadRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; @@ -98,6 +102,10 @@ export declare class DialogueCallbacks implements OnUpdate { unIgnoreFriend(url: string, request: IUIDRequestData, sessionID: string): INullResponseData; clearMail(url: string, request: IClearMailMessageRequest, sessionID: string): IGetBodyResponseData; removeMail(url: string, request: IRemoveMailMessageRequest, sessionID: string): IGetBodyResponseData; + createGroupMail(url: string, info: ICreateGroupMailRequest, sessionID: string): IGetBodyResponseData; + changeMailGroupOwner(url: string, info: IChangeGroupMailOwnerRequest, sessionID: string): IGetBodyResponseData; + addUserToMail(url: string, info: IAddUserGroupMailRequest, sessionID: string): IGetBodyResponseData; + removeUserFromMail(url: string, info: IRemoveUserGroupMailRequest, sessionID: string): IGetBodyResponseData; onUpdate(timeSinceLastRun: number): Promise; getRoute(): string; } diff --git a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts index 511d68a..f4fa0d7 100644 --- a/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/GameCallbacks.d.ts @@ -8,6 +8,8 @@ import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigRespons import { IGameEmptyCrcRequestData } from "@spt-aki/models/eft/game/IGameEmptyCrcRequestData"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; import { IGameLogoutResponseData } from "@spt-aki/models/eft/game/IGameLogoutResponseData"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; +import { IGameModeResponse } from "@spt-aki/models/eft/game/IGameModeResponse"; import { IGameStartResponse } from "@spt-aki/models/eft/game/IGameStartResponse"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; @@ -47,6 +49,11 @@ export declare class GameCallbacks implements OnLoad { * @returns IGameConfigResponse */ getGameConfig(url: string, info: IGameEmptyCrcRequestData, sessionID: string): IGetBodyResponseData; + /** + * Handle client/game/mode + * @returns IGameModeResponse + */ + getGameMode(url: string, info: IGameModeRequestData, sessionID: string): IGetBodyResponseData; /** * Handle client/server/list */ diff --git a/TypeScript/9RouterHooks/types/callbacks/ItemEventCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/ItemEventCallbacks.d.ts index b54d0f6..97547c6 100644 --- a/TypeScript/9RouterHooks/types/callbacks/ItemEventCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/ItemEventCallbacks.d.ts @@ -8,7 +8,7 @@ export declare class ItemEventCallbacks { protected httpResponse: HttpResponseUtil; protected itemEventRouter: ItemEventRouter; constructor(httpResponse: HttpResponseUtil, itemEventRouter: ItemEventRouter); - handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): IGetBodyResponseData; + handleEvents(url: string, info: IItemEventRouterRequest, sessionID: string): Promise>; /** * Return true if the passed in list of warnings contains critical issues * @param warnings The list of warnings to check for critical errors diff --git a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts index ae47754..4203fa1 100644 --- a/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/MatchCallbacks.d.ts @@ -2,20 +2,19 @@ import { MatchController } from "@spt-aki/controllers/MatchController"; import { IEmptyRequestData } from "@spt-aki/models/eft/common/IEmptyRequestData"; import { IGetBodyResponseData } from "@spt-aki/models/eft/httpResponse/IGetBodyResponseData"; import { INullResponseData } from "@spt-aki/models/eft/httpResponse/INullResponseData"; -import { IAcceptGroupInviteRequest } from "@spt-aki/models/eft/match/IAcceptGroupInviteRequest"; -import { IAcceptGroupInviteResponse } from "@spt-aki/models/eft/match/IAcceptGroupInviteResponse"; -import { ICancelGroupInviteRequest } from "@spt-aki/models/eft/match/ICancelGroupInviteRequest"; -import { IDeclineGroupInviteRequest } from "@spt-aki/models/eft/match/IDeclineGroupInviteRequest"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IMatchGroupCurrentResponse } from "@spt-aki/models/eft/match/IMatchGroupCurrentResponse"; +import { IMatchGroupInviteSendRequest } from "@spt-aki/models/eft/match/IMatchGroupInviteSendRequest"; +import { IMatchGroupPlayerRemoveRequest } from "@spt-aki/models/eft/match/IMatchGroupPlayerRemoveRequest"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IMatchGroupTransferRequest } from "@spt-aki/models/eft/match/IMatchGroupTransferRequest"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IPutMetricsRequestData } from "@spt-aki/models/eft/match/IPutMetricsRequestData"; -import { IRemovePlayerFromGroupRequest } from "@spt-aki/models/eft/match/IRemovePlayerFromGroupRequest"; -import { ISendGroupInviteRequest } from "@spt-aki/models/eft/match/ISendGroupInviteRequest"; -import { ITransferGroupRequest } from "@spt-aki/models/eft/match/ITransferGroupRequest"; +import { IRequestIdRequest } from "@spt-aki/models/eft/match/IRequestIdRequest"; import { IUpdatePingRequestData } from "@spt-aki/models/eft/match/IUpdatePingRequestData"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; @@ -31,25 +30,26 @@ export declare class MatchCallbacks { exitMatch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/exit_from_menu */ exitToMenu(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + groupCurrent(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; startGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; stopGroupSearch(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; /** Handle client/match/group/invite/send */ - sendGroupInvite(url: string, info: ISendGroupInviteRequest, sessionID: string): IGetBodyResponseData; + sendGroupInvite(url: string, info: IMatchGroupInviteSendRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/invite/accept */ - acceptGroupInvite(url: string, info: IAcceptGroupInviteRequest, sessionID: string): IGetBodyResponseData; + acceptGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/decline */ - declineGroupInvite(url: string, info: IDeclineGroupInviteRequest, sessionID: string): IGetBodyResponseData; + declineGroupInvite(url: string, info: IRequestIdRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel */ - cancelGroupInvite(url: string, info: ICancelGroupInviteRequest, sessionID: string): IGetBodyResponseData; + cancelGroupInvite(url: string, info: IRequestIdRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/transfer */ - transferGroup(url: string, info: ITransferGroupRequest, sessionID: string): IGetBodyResponseData; + transferGroup(url: string, info: IMatchGroupTransferRequest, sessionId: string): IGetBodyResponseData; /** Handle client/match/group/invite/cancel-all */ - cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionID: string): INullResponseData; + cancelAllGroupInvite(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** @deprecated - not called on raid start/end or game start/exit */ - putMetrics(url: string, info: IPutMetricsRequestData, sessionID: string): INullResponseData; - serverAvailable(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; + putMetrics(url: string, info: IPutMetricsRequestData, sessionId: string): INullResponseData; + serverAvailable(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; /** Handle match/group/start_game */ - joinMatch(url: string, info: IJoinMatchRequestData, sessionID: string): IGetBodyResponseData; + joinMatch(url: string, info: IMatchGroupStartGameRequest, sessionID: string): IGetBodyResponseData; /** Handle client/getMetricsConfig */ getMetrics(url: string, info: any, sessionID: string): IGetBodyResponseData; /** @@ -57,16 +57,20 @@ export declare class MatchCallbacks { * Handle client/match/group/status * @returns */ - getGroupStatus(url: string, info: IGetGroupStatusRequestData, sessionID: string): IGetBodyResponseData; + getGroupStatus(url: string, info: IMatchGroupStatusRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/delete */ - deleteGroup(url: string, info: any, sessionID: string): INullResponseData; + deleteGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; leaveGroup(url: string, info: IEmptyRequestData, sessionID: string): IGetBodyResponseData; /** Handle client/match/group/player/remove */ - removePlayerFromGroup(url: string, info: IRemovePlayerFromGroupRequest, sessionID: string): INullResponseData; + removePlayerFromGroup(url: string, info: IMatchGroupPlayerRemoveRequest, sessionID: string): IGetBodyResponseData; /** Handle client/match/offline/end */ endOfflineRaid(url: string, info: IEndOfflineRaidRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration */ getRaidConfiguration(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; /** Handle client/raid/configuration-by-profile */ getConfigurationByProfile(url: string, info: IGetRaidConfigurationRequestData, sessionID: string): INullResponseData; + /** Handle client/match/group/raid/ready */ + raidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; + /** Handle client/match/group/raid/not-ready */ + notRaidReady(url: string, info: IEmptyRequestData, sessionId: string): IGetBodyResponseData; } diff --git a/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts b/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts index 5dc21d0..d448d6b 100644 --- a/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts +++ b/TypeScript/9RouterHooks/types/callbacks/RagfairCallbacks.d.ts @@ -22,19 +22,17 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { RagfairServer } from "@spt-aki/servers/RagfairServer"; import { RagfairTaxService } from "@spt-aki/services/RagfairTaxService"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; /** * Handle ragfair related callback events */ export declare class RagfairCallbacks implements OnLoad, OnUpdate { protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected ragfairController: RagfairController; protected ragfairTaxService: RagfairTaxService; protected configServer: ConfigServer; protected ragfairConfig: IRagfairConfig; - constructor(httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); + constructor(httpResponse: HttpResponseUtil, ragfairServer: RagfairServer, ragfairController: RagfairController, ragfairTaxService: RagfairTaxService, configServer: ConfigServer); onLoad(): Promise; getRoute(): string; onUpdate(timeSinceLastRun: number): Promise; diff --git a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts index 556cc5d..99a848f 100644 --- a/TypeScript/9RouterHooks/types/controllers/BotController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/BotController.d.ts @@ -3,11 +3,13 @@ import { BotGenerator } from "@spt-aki/generators/BotGenerator"; import { BotDifficultyHelper } from "@spt-aki/helpers/BotDifficultyHelper"; import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; +import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Condition, IGenerateBotsRequestData } from "@spt-aki/models/eft/bot/IGenerateBotsRequestData"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { Difficulty } from "@spt-aki/models/eft/common/tables/IBotType"; +import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -17,7 +19,7 @@ import { BotGenerationCacheService } from "@spt-aki/services/BotGenerationCacheS import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotController { protected logger: ILogger; @@ -33,10 +35,10 @@ export declare class BotController { protected configServer: ConfigServer; protected applicationContext: ApplicationContext; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(logger: ILogger, databaseServer: DatabaseServer, botGenerator: BotGenerator, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, botGenerationCacheService: BotGenerationCacheService, matchBotDetailsCacheService: MatchBotDetailsCacheService, localisationService: LocalisationService, seasonalEventService: SeasonalEventService, profileHelper: ProfileHelper, configServer: ConfigServer, applicationContext: ApplicationContext, randomUtil: RandomUtil, cloner: ICloner); /** * Return the number of bot load-out varieties to be generated * @param type bot Type we want the load-out gen count for @@ -65,7 +67,7 @@ export declare class BotController { * @param info bot generation request info * @returns IBotBase array */ - generate(sessionId: string, info: IGenerateBotsRequestData): IBotBase[]; + generate(sessionId: string, info: IGenerateBotsRequestData): Promise; /** * On first bot generation bots are generated and stored inside a cache, ready to be used later * @param request Bot generation request object @@ -73,14 +75,47 @@ export declare class BotController { * @param sessionId Session id * @returns */ - protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): IBotBase[]; + protected generateBotsFirstTime(request: IGenerateBotsRequestData, pmcProfile: IPmcData, sessionId: string): Promise; + /** + * Create a BotGenerationDetails for the bot generator to use + * @param condition Client data defining bot type and difficulty + * @param pmcProfile Player who is generating bots + * @param allPmcsHaveSameNameAsPlayer Should all PMCs have same name as player + * @param pmcLevelRangeForMap Min/max levels for PMCs to generate within + * @param botCountToGenerate How many bots to generate + * @param generateAsPmc Force bot being generated a PMC + * @returns BotGenerationDetails + */ + protected getBotGenerationDetailsForWave(condition: Condition, pmcProfile: IPmcData, allPmcsHaveSameNameAsPlayer: boolean, pmcLevelRangeForMap: MinMax, botCountToGenerate: number, generateAsPmc: boolean): BotGenerationDetails; + /** + * Get players profile level + * @param pmcProfile Profile to get level from + * @returns Level as number + */ + protected getPlayerLevelFromProfile(pmcProfile: IPmcData): number; + /** + * Generate many bots and store then on the cache + * @param condition the condition details to generate the bots with + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @returns A promise for the bots to be done generating + */ + protected generateWithBotDetails(condition: Condition, botGenerationDetails: BotGenerationDetails, sessionId: string): Promise; + /** + * Generate a single bot and store it in the cache + * @param botGenerationDetails the bot details to generate the bot with + * @param sessionId Session id + * @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; /** * Pull a single bot out of cache and return, if cache is empty add bots to it and then return * @param sessionId Session id * @param request Bot generation request object * @returns Single IBotBase object */ - protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): IBotBase[]; + protected returnSingleBotFromCache(sessionId: string, request: IGenerateBotsRequestData): Promise; /** * Get the difficulty passed in, if its not "asonline", get selected difficulty from config * @param requestedDifficulty diff --git a/TypeScript/9RouterHooks/types/controllers/BuildController.d.ts b/TypeScript/9RouterHooks/types/controllers/BuildController.d.ts index 93c0709..22e8eb1 100644 --- a/TypeScript/9RouterHooks/types/controllers/BuildController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/BuildController.d.ts @@ -8,18 +8,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class BuildController { protected logger: ILogger; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected profileHelper: ProfileHelper; protected itemHelper: ItemHelper; protected saveServer: SaveServer; - constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, jsonUtil: JsonUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, saveServer: SaveServer, cloner: ICloner); /** Handle client/handbook/builds/my/list */ getUserBuilds(sessionID: string): IUserBuilds; /** Handle client/builds/weapon/save */ diff --git a/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts b/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts index 0cb31c1..2ad90c4 100644 --- a/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/DialogueController.d.ts @@ -1,5 +1,7 @@ import { IDialogueChatBot } from "@spt-aki/helpers/Dialogue/IDialogueChatBot"; import { DialogueHelper } from "@spt-aki/helpers/DialogueHelper"; +import { IFriendRequestData } from "@spt-aki/models/eft/dialog/IFriendRequestData"; +import { IFriendRequestSendResponse } from "@spt-aki/models/eft/dialog/IFriendRequestSendResponse"; import { IGetAllAttachmentsResponse } from "@spt-aki/models/eft/dialog/IGetAllAttachmentsResponse"; import { IGetFriendListDataResponse } from "@spt-aki/models/eft/dialog/IGetFriendListDataResponse"; import { IGetMailDialogViewRequestData } from "@spt-aki/models/eft/dialog/IGetMailDialogViewRequestData"; @@ -145,4 +147,6 @@ export declare class DialogueController { * @returns true or false */ protected messageHasExpired(message: Message): boolean; + /** Handle client/friend/request/send */ + sendFriendRequest(sessionID: string, request: IFriendRequestData): IFriendRequestSendResponse; } diff --git a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts index cf61d29..f64e42d 100644 --- a/TypeScript/9RouterHooks/types/controllers/GameController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/GameController.d.ts @@ -9,6 +9,7 @@ import { ICheckVersionResponse } from "@spt-aki/models/eft/game/ICheckVersionRes import { ICurrentGroupResponse } from "@spt-aki/models/eft/game/ICurrentGroupResponse"; import { IGameConfigResponse } from "@spt-aki/models/eft/game/IGameConfigResponse"; import { IGameKeepAliveResponse } from "@spt-aki/models/eft/game/IGameKeepAliveResponse"; +import { IGameModeRequestData } from "@spt-aki/models/eft/game/IGameModeRequestData"; import { IGetRaidTimeRequest } from "@spt-aki/models/eft/game/IGetRaidTimeRequest"; import { IGetRaidTimeResponse } from "@spt-aki/models/eft/game/IGetRaidTimeResponse"; import { IServerDetails } from "@spt-aki/models/eft/game/IServerDetails"; @@ -33,14 +34,13 @@ import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class GameController { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected preAkiModLoader: PreAkiModLoader; @@ -59,6 +59,7 @@ export declare class GameController { protected profileActivityService: ProfileActivityService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; + protected cloner: ICloner; protected httpConfig: IHttpConfig; protected coreConfig: ICoreConfig; protected locationConfig: ILocationConfig; @@ -67,7 +68,7 @@ export declare class GameController { protected pmcConfig: IPmcConfig; protected lootConfig: ILootConfig; protected botConfig: IBotConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, hashUtil: HashUtil, preAkiModLoader: PreAkiModLoader, httpServerHelper: HttpServerHelper, randomUtil: RandomUtil, hideoutHelper: HideoutHelper, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, localisationService: LocalisationService, customLocationWaveService: CustomLocationWaveService, openZoneService: OpenZoneService, seasonalEventService: SeasonalEventService, itemBaseClassService: ItemBaseClassService, giftService: GiftService, raidTimeAdjustmentService: RaidTimeAdjustmentService, profileActivityService: ProfileActivityService, applicationContext: ApplicationContext, configServer: ConfigServer, cloner: ICloner); load(): void; /** * Handle client/game/start @@ -88,6 +89,10 @@ export declare class GameController { * Handle client/game/config */ getGameConfig(sessionID: string): IGameConfigResponse; + /** + * Handle client/game/mode + */ + getGameMode(sessionID: string, info: IGameModeRequestData): any; /** * Handle client/server/list */ diff --git a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts index 5206cba..5b2c170 100644 --- a/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HealthController.d.ts @@ -12,11 +12,10 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class HealthController { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected itemHelper: ItemHelper; protected paymentService: PaymentService; @@ -24,7 +23,8 @@ export declare class HealthController { protected localisationService: LocalisationService; protected httpResponse: HttpResponseUtil; protected healthHelper: HealthHelper; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper); + protected cloner: ICloner; + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, itemHelper: ItemHelper, paymentService: PaymentService, inventoryHelper: InventoryHelper, localisationService: LocalisationService, httpResponse: HttpResponseUtil, healthHelper: HealthHelper, cloner: ICloner); /** * stores in-raid player health * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts index c7e6872..600c22d 100644 --- a/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/HideoutController.d.ts @@ -35,9 +35,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { ProfileActivityService } from "@spt-aki/services/ProfileActivityService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutController { @@ -60,12 +60,12 @@ export declare class HideoutController { protected localisationService: LocalisationService; protected profileActivityService: ProfileActivityService; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; + protected cloner: ICloner; /** Key used in TaskConditionCounters array */ protected static nameTaskConditionCountersCrafting: string; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, jsonUtil: JsonUtil, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, inventoryHelper: InventoryHelper, itemHelper: ItemHelper, saveServer: SaveServer, playerService: PlayerService, presetHelper: PresetHelper, paymentHelper: PaymentHelper, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, hideoutHelper: HideoutHelper, scavCaseRewardGenerator: ScavCaseRewardGenerator, localisationService: LocalisationService, profileActivityService: ProfileActivityService, configServer: ConfigServer, fenceService: FenceService, cloner: ICloner); /** * Handle HideoutUpgrade event * Start a hideout area upgrade diff --git a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts index 1f923dd..8749ba7 100644 --- a/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InraidController.d.ts @@ -28,7 +28,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { MatchBotDetailsCacheService } from "@spt-aki/services/MatchBotDetailsCacheService"; import { PmcChatResponseService } from "@spt-aki/services/PmcChatResponseService"; import { TraderServicesService } from "@spt-aki/services/TraderServicesService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -37,7 +36,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InraidController { protected logger: ILogger; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; protected pmcChatResponseService: PmcChatResponseService; @@ -62,7 +60,7 @@ export declare class InraidController { protected locationConfig: ILocationConfig; protected ragfairConfig: IRagfairConfig; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, saveServer: SaveServer, jsonUtil: JsonUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); + constructor(logger: ILogger, saveServer: SaveServer, timeUtil: TimeUtil, databaseServer: DatabaseServer, pmcChatResponseService: PmcChatResponseService, matchBotDetailsCacheService: MatchBotDetailsCacheService, questHelper: QuestHelper, itemHelper: ItemHelper, profileHelper: ProfileHelper, playerScavGenerator: PlayerScavGenerator, healthHelper: HealthHelper, traderHelper: TraderHelper, traderServicesService: TraderServicesService, insuranceService: InsuranceService, inRaidHelper: InRaidHelper, applicationContext: ApplicationContext, configServer: ConfigServer, mailSendService: MailSendService, randomUtil: RandomUtil); /** * Save locationId to active profiles inraid object AND app context * @param sessionID Session id diff --git a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts index b08f2ef..ccb5c18 100644 --- a/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InsuranceController.d.ts @@ -20,8 +20,8 @@ import { InsuranceService } from "@spt-aki/services/InsuranceService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -29,7 +29,6 @@ export declare class InsuranceController { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected eventOutputHolder: EventOutputHolder; protected timeUtil: TimeUtil; @@ -45,9 +44,10 @@ export declare class InsuranceController { protected mailSendService: MailSendService; protected ragfairPriceService: RagfairPriceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insuranceConfig: IInsuranceConfig; protected roubleTpl: string; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, hashUtil: HashUtil, eventOutputHolder: EventOutputHolder, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileHelper: ProfileHelper, dialogueHelper: DialogueHelper, weightedRandomHelper: WeightedRandomHelper, traderHelper: TraderHelper, paymentService: PaymentService, insuranceService: InsuranceService, mailSendService: MailSendService, ragfairPriceService: RagfairPriceService, configServer: ConfigServer, cloner: ICloner); /** * Process insurance items of all profiles prior to being given back to the player through the mail service. * diff --git a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts index 7597437..0d7f5ad 100644 --- a/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/InventoryController.d.ts @@ -35,14 +35,13 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class InventoryController { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -59,7 +58,8 @@ export declare class InventoryController { protected lootGenerator: LootGenerator; protected eventOutputHolder: EventOutputHolder; protected httpResponseUtil: HttpResponseUtil; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil); + protected cloner: ICloner; + constructor(logger: ILogger, hashUtil: HashUtil, itemHelper: ItemHelper, randomUtil: RandomUtil, databaseServer: DatabaseServer, fenceService: FenceService, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, questHelper: QuestHelper, hideoutHelper: HideoutHelper, ragfairOfferService: RagfairOfferService, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, playerService: PlayerService, lootGenerator: LootGenerator, eventOutputHolder: EventOutputHolder, httpResponseUtil: HttpResponseUtil, cloner: ICloner); /** * Move Item * change location of item with parentId and slotId diff --git a/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts b/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts index 5595baf..1b04b2e 100644 --- a/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/LocationController.d.ts @@ -16,12 +16,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RaidTimeAdjustmentService } from "@spt-aki/services/RaidTimeAdjustmentService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class LocationController { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected weightedRandomHelper: WeightedRandomHelper; @@ -35,9 +34,10 @@ export declare class LocationController { protected timeUtil: TimeUtil; protected configServer: ConfigServer; protected applicationContext: ApplicationContext; + protected cloner: ICloner; protected airdropConfig: IAirdropConfig; protected locationConfig: ILocationConfig; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext); + constructor(hashUtil: HashUtil, randomUtil: RandomUtil, weightedRandomHelper: WeightedRandomHelper, logger: ILogger, locationGenerator: LocationGenerator, localisationService: LocalisationService, raidTimeAdjustmentService: RaidTimeAdjustmentService, itemFilterService: ItemFilterService, lootGenerator: LootGenerator, databaseServer: DatabaseServer, timeUtil: TimeUtil, configServer: ConfigServer, applicationContext: ApplicationContext, cloner: ICloner); /** * Handle client/location/getLocalloot * Get a location (map) with generated loot data diff --git a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts index 708cee2..20ed9f6 100644 --- a/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/MatchController.d.ts @@ -4,11 +4,11 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { TraderHelper } from "@spt-aki/helpers/TraderHelper"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IEndOfflineRaidRequestData } from "@spt-aki/models/eft/match/IEndOfflineRaidRequestData"; -import { IGetGroupStatusRequestData } from "@spt-aki/models/eft/match/IGetGroupStatusRequestData"; -import { IGetGroupStatusResponse } from "@spt-aki/models/eft/match/IGetGroupStatusResponse"; import { IGetRaidConfigurationRequestData } from "@spt-aki/models/eft/match/IGetRaidConfigurationRequestData"; -import { IJoinMatchRequestData } from "@spt-aki/models/eft/match/IJoinMatchRequestData"; -import { IJoinMatchResult } from "@spt-aki/models/eft/match/IJoinMatchResult"; +import { IMatchGroupStartGameRequest } from "@spt-aki/models/eft/match/IMatchGroupStartGameRequest"; +import { IMatchGroupStatusRequest } from "@spt-aki/models/eft/match/IMatchGroupStatusRequest"; +import { IMatchGroupStatusResponse } from "@spt-aki/models/eft/match/IMatchGroupStatusResponse"; +import { IProfileStatusResponse } from "@spt-aki/models/eft/match/IProfileStatusResponse"; import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig"; import { IMatchConfig } from "@spt-aki/models/spt/config/IMatchConfig"; import { IPmcConfig } from "@spt-aki/models/spt/config/IPmcConfig"; @@ -49,9 +49,9 @@ export declare class MatchController { /** Handle client/match/group/delete */ deleteGroup(info: any): void; /** Handle match/group/start_game */ - joinMatch(info: IJoinMatchRequestData, sessionId: string): IJoinMatchResult; + joinMatch(info: IMatchGroupStartGameRequest, sessionId: string): IProfileStatusResponse; /** Handle client/match/group/status */ - getGroupStatus(info: IGetGroupStatusRequestData): IGetGroupStatusResponse; + getGroupStatus(info: IMatchGroupStatusRequest): IMatchGroupStatusResponse; /** * Handle /client/raid/configuration * @param request Raid config request diff --git a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts index 786b3d3..1d13a10 100644 --- a/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/QuestController.d.ts @@ -24,13 +24,12 @@ import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { PlayerService } from "@spt-aki/services/PlayerService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestController { protected logger: ILogger; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected httpResponseUtil: HttpResponseUtil; protected eventOutputHolder: EventOutputHolder; protected databaseServer: DatabaseServer; @@ -46,8 +45,9 @@ export declare class QuestController { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, jsonUtil: JsonUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, httpResponseUtil: HttpResponseUtil, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, itemHelper: ItemHelper, dialogueHelper: DialogueHelper, mailSendService: MailSendService, profileHelper: ProfileHelper, traderHelper: TraderHelper, questHelper: QuestHelper, questConditionHelper: QuestConditionHelper, playerService: PlayerService, localeService: LocaleService, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Handle client/quest/list * Get all quests visible to player diff --git a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts index 1842abe..ed5343a 100644 --- a/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/RepeatableQuestController.d.ts @@ -16,8 +16,8 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -27,7 +27,6 @@ export declare class RepeatableQuestController { protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected httpResponse: HttpResponseUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected profileFixerService: ProfileFixerService; protected eventOutputHolder: EventOutputHolder; @@ -37,8 +36,9 @@ export declare class RepeatableQuestController { protected repeatableQuestHelper: RepeatableQuestHelper; protected questHelper: QuestHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, timeUtil: TimeUtil, randomUtil: RandomUtil, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, profileFixerService: ProfileFixerService, eventOutputHolder: EventOutputHolder, paymentService: PaymentService, objectId: ObjectId, repeatableQuestGenerator: RepeatableQuestGenerator, repeatableQuestHelper: RepeatableQuestHelper, questHelper: QuestHelper, configServer: ConfigServer, cloner: ICloner); /** * Handle client/repeatalbeQuests/activityPeriods * Returns an array of objects in the format of repeatable quests to the client. diff --git a/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts b/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts index ce4d02d..e2eadbc 100644 --- a/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/TradeController.d.ts @@ -23,7 +23,6 @@ import { MailSendService } from "@spt-aki/services/MailSendService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TradeController { @@ -37,7 +36,6 @@ export declare class TradeController { protected itemHelper: ItemHelper; protected profileHelper: ProfileHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected ragfairServer: RagfairServer; protected httpResponse: HttpResponseUtil; protected localisationService: LocalisationService; @@ -47,7 +45,7 @@ export declare class TradeController { protected roubleTpl: string; protected ragfairConfig: IRagfairConfig; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, tradeHelper: TradeHelper, timeUtil: TimeUtil, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, ragfairServer: RagfairServer, httpResponse: HttpResponseUtil, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, mailSendService: MailSendService, configServer: ConfigServer); /** Handle TradingConfirm event */ confirmTrading(pmcData: IPmcData, request: IProcessBaseTradeRequestData, sessionID: string): IItemEventRouterResponse; /** Handle RagFairBuyOffer event */ diff --git a/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts b/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts index 6f1a92f..a8826b4 100644 --- a/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts +++ b/TypeScript/9RouterHooks/types/controllers/TraderController.d.ts @@ -10,7 +10,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderController { protected logger: ILogger; @@ -23,10 +23,10 @@ export declare class TraderController { protected traderPurchasePersisterService: TraderPurchasePersisterService; protected fenceService: FenceService; protected fenceBaseAssortGenerator: FenceBaseAssortGenerator; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, databaseServer: DatabaseServer, traderAssortHelper: TraderAssortHelper, profileHelper: ProfileHelper, traderHelper: TraderHelper, traderAssortService: TraderAssortService, traderPurchasePersisterService: TraderPurchasePersisterService, fenceService: FenceService, fenceBaseAssortGenerator: FenceBaseAssortGenerator, configServer: ConfigServer, cloner: ICloner); /** * Runs when onLoad event is fired * Iterate over traders, ensure a pristine copy of their assorts is stored in traderAssortService diff --git a/TypeScript/9RouterHooks/types/di/Router.d.ts b/TypeScript/9RouterHooks/types/di/Router.d.ts index 79f3324..437e55d 100644 --- a/TypeScript/9RouterHooks/types/di/Router.d.ts +++ b/TypeScript/9RouterHooks/types/di/Router.d.ts @@ -11,17 +11,17 @@ export declare class Router { export declare class StaticRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleStatic(url: string, info: any, sessionID: string, output: string): any; + handleStatic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class DynamicRouter extends Router { private routes; constructor(routes: RouteAction[]); - handleDynamic(url: string, info: any, sessionID: string, output: string): any; + handleDynamic(url: string, info: any, sessionID: string, output: string): Promise; getHandledRoutes(): HandledRoute[]; } export declare class ItemEventRouterDefinition extends Router { - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): void; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } export declare class SaveLoadRouter extends Router { handleLoad(profile: IAkiProfile): IAkiProfile; @@ -33,6 +33,6 @@ export declare class HandledRoute { } export declare class RouteAction { url: string; - action: (url: string, info: any, sessionID: string, output: string) => any; - constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => any); + action: (url: string, info: any, sessionID: string, output: string) => Promise; + constructor(url: string, action: (url: string, info: any, sessionID: string, output: string) => Promise); } diff --git a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts index f850eea..f0e9f35 100644 --- a/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotEquipmentModGenerator.d.ts @@ -21,14 +21,13 @@ import { BotEquipmentModPoolService } from "@spt-aki/services/BotEquipmentModPoo import { BotModLimits, BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { IGenerateEquipmentProperties } from "./BotInventoryGenerator"; import { IFilterPlateModsForSlotByLevelResult } from "./IFilterPlateModsForSlotByLevelResult"; export declare class BotEquipmentModGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected probabilityHelper: ProbabilityHelper; @@ -46,8 +45,9 @@ export declare class BotEquipmentModGenerator { protected localisationService: LocalisationService; protected botEquipmentModPoolService: BotEquipmentModPoolService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, probabilityHelper: ProbabilityHelper, databaseServer: DatabaseServer, itemHelper: ItemHelper, botEquipmentFilterService: BotEquipmentFilterService, itemFilterService: ItemFilterService, profileHelper: ProfileHelper, botWeaponModLimitService: BotWeaponModLimitService, botHelper: BotHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, weightedRandomHelper: WeightedRandomHelper, presetHelper: PresetHelper, localisationService: LocalisationService, botEquipmentModPoolService: BotEquipmentModPoolService, configServer: ConfigServer, cloner: ICloner); /** * Check mods are compatible and add to array * @param equipment Equipment item to add mods to @@ -151,7 +151,7 @@ export declare class BotEquipmentModGenerator { * Get default preset for weapon, get specific weapon presets for edge cases (mp5/silenced dvl) * @param weaponTemplate * @param parentItemTpl - * @returns + * @returns Default preset found */ protected getMatchingPreset(weaponTemplate: ITemplateItem, parentItemTpl: string): IPreset; /** diff --git a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts index 7a10c36..5825dce 100644 --- a/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotGenerator.d.ts @@ -15,8 +15,8 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotEquipmentFilterService } from "@spt-aki/services/BotEquipmentFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class BotGenerator { @@ -24,7 +24,6 @@ export declare class BotGenerator { protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected databaseServer: DatabaseServer; protected botInventoryGenerator: BotInventoryGenerator; @@ -36,9 +35,10 @@ export declare class BotGenerator { protected seasonalEventService: SeasonalEventService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, jsonUtil: JsonUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, profileHelper: ProfileHelper, databaseServer: DatabaseServer, botInventoryGenerator: BotInventoryGenerator, botLevelGenerator: BotLevelGenerator, botEquipmentFilterService: BotEquipmentFilterService, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botDifficultyHelper: BotDifficultyHelper, seasonalEventService: SeasonalEventService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Generate a player scav bot object * @param role e.g. assault / pmcbot diff --git a/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts index 220569b..044c28b 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLevelGenerator.d.ts @@ -1,6 +1,5 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; import { IRandomisedBotLevelResult } from "@spt-aki/models/eft/bot/IRandomisedBotLevelResult"; -import { IExpTable } from "@spt-aki/models/eft/common/IGlobals"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { BotGenerationDetails } from "@spt-aki/models/spt/bots/BotGenerationDetails"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; @@ -13,24 +12,26 @@ export declare class BotLevelGenerator { constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer); /** * Return a randomised bot level and exp value - * @param levelDetails min and max of level for bot - * @param botGenerationDetails Deatils to help generate a bot - * @param bot being level is being generated for + * @param levelDetails Min and max of level for bot + * @param botGenerationDetails Details to help generate a bot + * @param bot Bot the level is being generated for * @returns IRandomisedBotLevelResult object */ generateBotLevel(levelDetails: MinMax, botGenerationDetails: BotGenerationDetails, bot: IBotBase): IRandomisedBotLevelResult; /** * Get the highest level a bot can be relative to the players level, but no further than the max size from globals.exp_table - * @param playerLevel Players current level - * @param relativeDeltaMax max delta above player level to go - * @returns highest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxLevel Max possible level + * @returns Highest level possible for bot */ - protected getHighestRelativeBotLevel(playerLevel: number, relativeDeltaMax: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getHighestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxLevel: number): number; /** * Get the lowest level a bot can be relative to the players level, but no lower than 1 - * @param playerLevel Players current level - * @param relativeDeltaMin Min delta below player level to go - * @returns lowest level possible for bot + * @param botGenerationDetails Details to help generate a bot + * @param levelDetails + * @param maxlevel Max level allowed + * @returns Lowest level possible for bot */ - protected getLowestRelativeBotLevel(playerLevel: number, relativeDeltaMin: number, levelDetails: MinMax, expTable: IExpTable[]): number; + protected getLowestRelativeBotLevel(botGenerationDetails: BotGenerationDetails, levelDetails: MinMax, maxlevel: number): number; } diff --git a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts index ca5d1bd..db2327d 100644 --- a/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotLootGenerator.d.ts @@ -18,15 +18,14 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotLootGenerator { protected logger: ILogger; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; - protected jsonUtil: JsonUtil; protected inventoryHelper: InventoryHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -37,9 +36,10 @@ export declare class BotLootGenerator { protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, jsonUtil: JsonUtil, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, itemHelper: ItemHelper, inventoryHelper: InventoryHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, botGeneratorHelper: BotGeneratorHelper, botWeaponGenerator: BotWeaponGenerator, weightedRandomHelper: WeightedRandomHelper, botHelper: BotHelper, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); protected getItemSpawnLimitsForBot(botRole: string): IItemSpawnLimitSettings; /** * Add loot to bots containers diff --git a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts index 125b43f..87a50f9 100644 --- a/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/BotWeaponGenerator.d.ts @@ -18,11 +18,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { BotWeaponModLimitService } from "@spt-aki/services/BotWeaponModLimitService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RepairService } from "@spt-aki/services/RepairService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotWeaponGenerator { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; @@ -37,11 +36,12 @@ export declare class BotWeaponGenerator { protected localisationService: LocalisationService; protected repairService: RepairService; protected inventoryMagGenComponents: IInventoryMagGen[]; + protected cloner: ICloner; protected readonly modMagazineSlotId = "mod_magazine"; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; protected repairConfig: IRepairConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[]); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, weightedRandomHelper: WeightedRandomHelper, botGeneratorHelper: BotGeneratorHelper, randomUtil: RandomUtil, configServer: ConfigServer, botWeaponGeneratorHelper: BotWeaponGeneratorHelper, botWeaponModLimitService: BotWeaponModLimitService, botEquipmentModGenerator: BotEquipmentModGenerator, localisationService: LocalisationService, repairService: RepairService, inventoryMagGenComponents: IInventoryMagGen[], cloner: ICloner); /** * Pick a random weapon based on weightings and generate a functional weapon * @param equipmentSlot Primary/secondary/holster diff --git a/TypeScript/9RouterHooks/types/generators/FenceBaseAssortGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/FenceBaseAssortGenerator.d.ts index 5ca8ed7..39df8c0 100644 --- a/TypeScript/9RouterHooks/types/generators/FenceBaseAssortGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/FenceBaseAssortGenerator.d.ts @@ -11,11 +11,9 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class FenceBaseAssortGenerator { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; protected itemHelper: ItemHelper; @@ -25,7 +23,7 @@ export declare class FenceBaseAssortGenerator { protected configServer: ConfigServer; protected fenceService: FenceService; protected traderConfig: ITraderConfig; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer, fenceService: FenceService); /** * Create base fence assorts dynamically and store in memory */ diff --git a/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts index ae16be4..9554579 100644 --- a/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/LocationGenerator.d.ts @@ -1,18 +1,17 @@ import { ContainerHelper } from "@spt-aki/helpers/ContainerHelper"; import { ItemHelper } from "@spt-aki/helpers/ItemHelper"; import { PresetHelper } from "@spt-aki/helpers/PresetHelper"; -import { IContainerMinMax, IStaticContainer } from "@spt-aki/models/eft/common/ILocation"; +import { IContainerMinMax, IStaticAmmoDetails, IStaticContainer, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot, Spawnpoint, SpawnpointTemplate, SpawnpointsForced } from "@spt-aki/models/eft/common/ILooseLoot"; import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails, IStaticContainerData, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -30,7 +29,6 @@ export interface IContainerGroupCount { export declare class LocationGenerator { protected logger: ILogger; protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected objectId: ObjectId; protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; @@ -40,8 +38,9 @@ export declare class LocationGenerator { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, jsonUtil: JsonUtil, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, objectId: ObjectId, randomUtil: RandomUtil, itemHelper: ItemHelper, mathUtil: MathUtil, seasonalEventService: SeasonalEventService, containerHelper: ContainerHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Create an array of container objects with randomised loot * @param locationBase Map base to generate containers for diff --git a/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts index 965d3b9..f9b40fa 100644 --- a/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/LootGenerator.d.ts @@ -14,7 +14,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; type ItemLimit = { current: number; @@ -25,7 +24,6 @@ export declare class LootGenerator { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; protected inventoryHelper: InventoryHelper; @@ -33,7 +31,7 @@ export declare class LootGenerator { protected localisationService: LocalisationService; protected ragfairLinkedItemService: RagfairLinkedItemService; protected itemFilterService: ItemFilterService; - constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, jsonUtil: JsonUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, inventoryHelper: InventoryHelper, weightedRandomHelper: WeightedRandomHelper, localisationService: LocalisationService, ragfairLinkedItemService: RagfairLinkedItemService, itemFilterService: ItemFilterService); /** * Generate a list of items based on configuration options parameter * @param options parameters to adjust how loot is generated diff --git a/TypeScript/9RouterHooks/types/generators/PlayerScavGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/PlayerScavGenerator.d.ts index 67967dd..813fd17 100644 --- a/TypeScript/9RouterHooks/types/generators/PlayerScavGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/PlayerScavGenerator.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { BotLootCacheService } from "@spt-aki/services/BotLootCacheService"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class PlayerScavGenerator { protected logger: ILogger; @@ -27,14 +27,14 @@ export declare class PlayerScavGenerator { protected saveServer: SaveServer; protected profileHelper: ProfileHelper; protected botHelper: BotHelper; - protected jsonUtil: JsonUtil; protected fenceService: FenceService; protected botLootCacheService: BotLootCacheService; protected localisationService: LocalisationService; protected botGenerator: BotGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected playerScavConfig: IPlayerScavConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, jsonUtil: JsonUtil, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, hashUtil: HashUtil, itemHelper: ItemHelper, botGeneratorHelper: BotGeneratorHelper, saveServer: SaveServer, profileHelper: ProfileHelper, botHelper: BotHelper, fenceService: FenceService, botLootCacheService: BotLootCacheService, localisationService: LocalisationService, botGenerator: BotGenerator, configServer: ConfigServer, cloner: ICloner); /** * Update a player profile to include a new player scav profile * @param sessionID session id to specify what profile is updated diff --git a/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts index 10f13f2..7b1a786 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairAssortGenerator.d.ts @@ -7,9 +7,7 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class RagfairAssortGenerator { - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -19,7 +17,7 @@ export declare class RagfairAssortGenerator { protected generatedAssortItems: Item[][]; protected ragfairConfig: IRagfairConfig; protected ragfairItemInvalidBaseTypes: string[]; - constructor(jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, seasonalEventService: SeasonalEventService, configServer: ConfigServer); /** * Get an array of arrays that can be sold on the flea * Each sub array contains item + children (if any) diff --git a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts index 46e61a3..4b4c6ea 100644 --- a/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RagfairOfferGenerator.d.ts @@ -17,13 +17,12 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairOfferService } from "@spt-aki/services/RagfairOfferService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class RagfairOfferGenerator { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; @@ -40,6 +39,7 @@ export declare class RagfairOfferGenerator { protected fenceService: FenceService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected allowedFleaPriceItemsForBarter: { tpl: string; @@ -47,7 +47,7 @@ export declare class RagfairOfferGenerator { }[]; /** Internal counter to ensure each offer created has a unique value for its intId property */ protected offerCounter: number; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, randomUtil: RandomUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, ragfairServerHelper: RagfairServerHelper, handbookHelper: HandbookHelper, saveServer: SaveServer, presetHelper: PresetHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferService: RagfairOfferService, ragfairPriceService: RagfairPriceService, localisationService: LocalisationService, paymentHelper: PaymentHelper, fenceService: FenceService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Create a flea offer and store it in the Ragfair server offers array * @param userID Owner of the offer diff --git a/TypeScript/9RouterHooks/types/generators/RepeatableQuestGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RepeatableQuestGenerator.d.ts index d020fac..8c9345d 100644 --- a/TypeScript/9RouterHooks/types/generators/RepeatableQuestGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RepeatableQuestGenerator.d.ts @@ -11,7 +11,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { ProbabilityObjectArray, RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected localisationService: LocalisationService; @@ -27,8 +26,9 @@ export declare class RepeatableQuestGenerator { protected repeatableQuestHelper: RepeatableQuestHelper; protected repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, localisationService: LocalisationService, objectId: ObjectId, repeatableQuestHelper: RepeatableQuestHelper, repeatableQuestRewardGenerator: RepeatableQuestRewardGenerator, configServer: ConfigServer, cloner: ICloner); /** * This method is called by /GetClientRepeatableQuests/ and creates one element of quest type format (see assets/database/templates/repeatableQuests.json). * It randomly draws a quest type (currently Elimination, Completion or Exploration) as well as a trader who is providing the quest diff --git a/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts index 9ac6341..a23afd3 100644 --- a/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/RepeatableQuestRewardGenerator.d.ts @@ -11,7 +11,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ObjectId } from "@spt-aki/utils/ObjectId"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; @@ -19,7 +19,6 @@ export declare class RepeatableQuestRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -29,8 +28,9 @@ export declare class RepeatableQuestRewardGenerator { protected itemFilterService: ItemFilterService; protected seasonalEventService: SeasonalEventService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, presetHelper: PresetHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, objectId: ObjectId, itemFilterService: ItemFilterService, seasonalEventService: SeasonalEventService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, mathUtil: MathUtil, databaseServer: DatabaseServer, 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 * - Experience diff --git a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts index 26f3412..aac0f05 100644 --- a/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/ScavCaseRewardGenerator.d.ts @@ -12,7 +12,6 @@ import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** * Handle the creation of randomised scav case rewards @@ -20,7 +19,6 @@ import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ScavCaseRewardGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; protected presetHelper: PresetHelper; @@ -32,7 +30,7 @@ export declare class ScavCaseRewardGenerator { protected scavCaseConfig: IScavCaseConfig; protected dbItemsCache: ITemplateItem[]; protected dbAmmoItemsCache: ITemplateItem[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, itemHelper: ItemHelper, presetHelper: PresetHelper, databaseServer: DatabaseServer, ragfairPriceService: RagfairPriceService, seasonalEventService: SeasonalEventService, itemFilterService: ItemFilterService, configServer: ConfigServer); /** * Create an array of rewards that will be given to the player upon completing their scav case build * @param recipeId recipe of the scav case craft diff --git a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts index dec30cd..75cb541 100644 --- a/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/generators/WeatherGenerator.d.ts @@ -5,6 +5,7 @@ import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IWeatherConfig } from "@spt-aki/models/spt/config/IWeatherConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { SeasonalEventService } from "@spt-aki/services/SeasonalEventService"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class WeatherGenerator { @@ -12,11 +13,12 @@ export declare class WeatherGenerator { protected logger: ILogger; protected randomUtil: RandomUtil; protected timeUtil: TimeUtil; + protected seasonalEventService: SeasonalEventService; protected applicationContext: ApplicationContext; protected configServer: ConfigServer; protected weatherConfig: IWeatherConfig; private serverStartTimestampMS; - constructor(weightedRandomHelper: WeightedRandomHelper, logger: ILogger, randomUtil: RandomUtil, timeUtil: TimeUtil, applicationContext: ApplicationContext, configServer: ConfigServer); + constructor(weightedRandomHelper: WeightedRandomHelper, 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 diff --git a/TypeScript/9RouterHooks/types/helpers/BotDifficultyHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotDifficultyHelper.d.ts index 84beba3..07c236e 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotDifficultyHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotDifficultyHelper.d.ts @@ -5,18 +5,18 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotDifficultyHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper, configServer: ConfigServer, cloner: ICloner); getPmcDifficultySettings(pmcType: "bear" | "usec", difficulty: string, usecType: string, bearType: string): Difficulty; /** * Get difficulty settings for desired bot type, if not found use assault bot types diff --git a/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts index 1026070..eafb081 100644 --- a/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/BotHelper.d.ts @@ -6,18 +6,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected randomUtil: RandomUtil; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected botConfig: IBotConfig; protected pmcConfig: IPmcConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, randomUtil: RandomUtil, localisationService: LocalisationService, configServer: ConfigServer); /** * Get a template object for the specified botRole from bots.types db * @param role botRole to get template for diff --git a/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts b/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts index d53189c..ea765b1 100644 --- a/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.d.ts @@ -10,18 +10,18 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class GiveSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; protected databaseServer: DatabaseServer; protected itemFilterService: ItemFilterService; + protected cloner: ICloner; /** * Regex to account for all these cases: * spt give "item name" 5 @@ -32,8 +32,9 @@ export declare class GiveSptCommand implements ISptCommand { */ private static commandRegex; private static acceptableConfidence; + private static excludedPresetItems; protected savedCommand: Map; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, itemFilterService: ItemFilterService, cloner: ICloner); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts b/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts index 8ec2ada..191af11 100644 --- a/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.d.ts @@ -11,12 +11,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class ProfileSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -29,7 +27,7 @@ export declare class ProfileSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer, profileHelper: ProfileHelper); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts b/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts index d84158a..7c05112 100644 --- a/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.d.ts @@ -9,12 +9,10 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TraderSptCommand implements ISptCommand { protected logger: ILogger; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected localeService: LocaleService; @@ -26,7 +24,7 @@ export declare class TraderSptCommand implements ISptCommand { */ private static commandRegex; protected savedCommand: SavedCommand; - constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); + constructor(logger: ILogger, itemHelper: ItemHelper, hashUtil: HashUtil, presetHelper: PresetHelper, mailSendService: MailSendService, localeService: LocaleService, databaseServer: DatabaseServer); getCommand(): string; getCommandHelp(): string; performAction(commandHandler: IUserDialogInfo, sessionId: string, request: ISendMessageRequest): string; diff --git a/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts index c6311e0..276506a 100644 --- a/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HandbookHelper.d.ts @@ -3,7 +3,7 @@ import { Item } from "@spt-aki/models/eft/common/tables/IItem"; import { IItemConfig } from "@spt-aki/models/spt/config/IItemConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; declare class LookupItem { readonly byId: Map; readonly byParent: Map; @@ -16,12 +16,12 @@ export declare class LookupCollection { } export declare class HandbookHelper { protected databaseServer: DatabaseServer; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected itemConfig: IItemConfig; protected lookupCacheGenerated: boolean; protected handbookPriceCache: LookupCollection; - constructor(databaseServer: DatabaseServer, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Create an in-memory cache of all items with associated handbook price in handbookPriceCache class */ diff --git a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts index 6aae71f..7a42ef1 100644 --- a/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HealthHelper.d.ts @@ -5,16 +5,16 @@ import { IHealthConfig } from "@spt-aki/models/spt/config/IHealthConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HealthHelper { - protected jsonUtil: JsonUtil; protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected healthConfig: IHealthConfig; - constructor(jsonUtil: JsonUtil, logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, configServer: ConfigServer, cloner: ICloner); /** * Resets the profiles vitality/health and vitality/effects properties to their defaults * @param sessionID Session Id diff --git a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts index cd5c2d6..642c999 100644 --- a/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/HideoutHelper.d.ts @@ -18,9 +18,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PlayerService } from "@spt-aki/services/PlayerService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class HideoutHelper { protected logger: ILogger; @@ -35,7 +35,7 @@ export declare class HideoutHelper { protected localisationService: LocalisationService; protected itemHelper: ItemHelper; protected configServer: ConfigServer; - protected jsonUtil: JsonUtil; + protected cloner: ICloner; static bitcoinFarm: string; static bitcoinProductionId: string; static waterCollector: string; @@ -43,7 +43,7 @@ export declare class HideoutHelper { static expeditionaryFuelTank: string; static maxSkillPoint: number; protected hideoutConfig: IHideoutConfig; - constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, jsonUtil: JsonUtil); + constructor(logger: ILogger, hashUtil: HashUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, eventOutputHolder: EventOutputHolder, httpResponse: HttpResponseUtil, profileHelper: ProfileHelper, inventoryHelper: InventoryHelper, playerService: PlayerService, localisationService: LocalisationService, itemHelper: ItemHelper, configServer: ConfigServer, cloner: ICloner); /** * Add production to profiles' Hideout.Production array * @param pmcData Profile to add production to diff --git a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts index a72c598..9301cf7 100644 --- a/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InRaidHelper.d.ts @@ -14,7 +14,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileFixerService } from "@spt-aki/services/ProfileFixerService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { ProfileHelper } from "./ProfileHelper"; @@ -22,7 +22,6 @@ export declare class InRaidHelper { protected logger: ILogger; protected timeUtil: TimeUtil; protected saveServer: SaveServer; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected inventoryHelper: InventoryHelper; @@ -33,9 +32,10 @@ export declare class InRaidHelper { protected profileFixerService: ProfileFixerService; protected configServer: ConfigServer; protected randomUtil: RandomUtil; + protected cloner: ICloner; protected lostOnDeathConfig: ILostOnDeathConfig; protected inRaidConfig: IInRaidConfig; - constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil); + constructor(logger: ILogger, timeUtil: TimeUtil, saveServer: SaveServer, itemHelper: ItemHelper, databaseServer: DatabaseServer, inventoryHelper: InventoryHelper, profileHelper: ProfileHelper, questHelper: QuestHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, profileFixerService: ProfileFixerService, configServer: ConfigServer, randomUtil: RandomUtil, cloner: ICloner); /** * Lookup quest item loss from lostOnDeath config * @returns True if items should be removed from inventory diff --git a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts index 8199ca3..9e62f9d 100644 --- a/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/InventoryHelper.d.ts @@ -24,9 +24,9 @@ import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export interface IOwnerInventoryItems { /** Inventory items from source */ from: Item[]; @@ -37,7 +37,6 @@ export interface IOwnerInventoryItems { } export declare class InventoryHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected httpResponse: HttpResponseUtil; protected fenceService: FenceService; @@ -51,8 +50,9 @@ export declare class InventoryHelper { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, httpResponse: HttpResponseUtil, fenceService: FenceService, databaseServer: DatabaseServer, paymentHelper: PaymentHelper, traderAssortHelper: TraderAssortHelper, dialogueHelper: DialogueHelper, itemHelper: ItemHelper, containerHelper: ContainerHelper, profileHelper: ProfileHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Add multiple items to player stash (assuming they all fit) * @param sessionId Session id diff --git a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts index 9195579..0779c12 100644 --- a/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ItemHelper.d.ts @@ -1,8 +1,8 @@ import { HandbookHelper } from "@spt-aki/helpers/HandbookHelper"; +import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/ILocation"; import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { InsuredItem } from "@spt-aki/models/eft/common/tables/IBotBase"; import { Item, Repairable, Upd } from "@spt-aki/models/eft/common/tables/IItem"; -import { IStaticAmmoDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; import { ITemplateItem } from "@spt-aki/models/eft/common/tables/ITemplateItem"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; @@ -10,6 +10,7 @@ import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { CompareUtil } from "@spt-aki/utils/CompareUtil"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; @@ -30,8 +31,9 @@ export declare class ItemHelper { protected localisationService: LocalisationService; protected localeService: LocaleService; protected compareUtil: CompareUtil; + protected cloner: ICloner; protected readonly defaultInvalidBaseTypes: string[]; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil); + constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, randomUtil: RandomUtil, objectId: ObjectId, mathUtil: MathUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemBaseClassService: ItemBaseClassService, itemFilterService: ItemFilterService, localisationService: LocalisationService, localeService: LocaleService, compareUtil: CompareUtil, cloner: ICloner); /** * This method will compare two items (with all its children) and see if the are equivalent. * This method will NOT compare IDs on the items @@ -368,9 +370,10 @@ export declare class ItemHelper { * @param staticAmmoDist Cartridge distribution * @param caliber Caliber of cartridge to add to magazine * @param minSizePercent % the magazine must be filled to + * @param defaultCartridgeTpl Cartridge to use when none found * @param weapon Weapon the magazine will be used for (if passed in uses Chamber as whitelist) */ - fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, weapon?: ITemplateItem): void; + fillMagazineWithRandomCartridge(magazine: Item[], magTemplate: ITemplateItem, staticAmmoDist: Record, caliber?: string, minSizePercent?: number, defaultCartridgeTpl?: string, weapon?: ITemplateItem): void; /** * Add child items to a magazine of a specific cartridge * @param magazineWithChildCartridges Magazine to add child items to diff --git a/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts index 5f4a533..669cbb6 100644 --- a/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/NotificationSendHelper.d.ts @@ -1,22 +1,22 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Dialogue, IUserDialogInfo } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; import { MessageType } from "@spt-aki/models/enums/MessageType"; import { SaveServer } from "@spt-aki/servers/SaveServer"; -import { WebSocketServer } from "@spt-aki/servers/WebSocketServer"; +import { AkiWebSocketConnectionHandler } from "@spt-aki/servers/ws/AkiWebSocketConnectionHandler"; import { NotificationService } from "@spt-aki/services/NotificationService"; import { HashUtil } from "@spt-aki/utils/HashUtil"; export declare class NotificationSendHelper { - protected webSocketServer: WebSocketServer; + protected akiWebSocketConnection: AkiWebSocketConnectionHandler; protected hashUtil: HashUtil; protected saveServer: SaveServer; protected notificationService: NotificationService; - constructor(webSocketServer: WebSocketServer, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); + constructor(akiWebSocketConnection: AkiWebSocketConnectionHandler, hashUtil: HashUtil, saveServer: SaveServer, notificationService: NotificationService); /** * Send notification message to the appropriate channel * @param sessionID * @param notificationMessage */ - sendMessage(sessionID: string, notificationMessage: INotification): void; + sendMessage(sessionID: string, notificationMessage: IWsNotificationEvent): void; /** * Send a message directly to the player * @param sessionId Session id diff --git a/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts index 9c27224..c691563 100644 --- a/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/NotifierHelper.d.ts @@ -1,26 +1,28 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; import { Message, MessageContentRagfair } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsChatMessageReceived } from "@spt-aki/models/eft/ws/IWsChatMessageReceived"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IWsRagfairOfferSold } from "@spt-aki/models/eft/ws/IWsRagfairOfferSold"; export declare class NotifierHelper { protected httpServerHelper: HttpServerHelper; /** * The default notification sent when waiting times out. */ - protected defaultNotification: INotification; + protected defaultNotification: IWsNotificationEvent; constructor(httpServerHelper: HttpServerHelper); - getDefaultNotification(): INotification; + getDefaultNotification(): IWsNotificationEvent; /** * Create a new notification that displays the "Your offer was sold!" prompt and removes sold offer from "My Offers" on clientside * @param dialogueMessage Message from dialog that was sent * @param ragfairData Ragfair data to attach to notification * @returns */ - createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): INotification; + createRagfairOfferSoldNotification(dialogueMessage: Message, ragfairData: MessageContentRagfair): IWsRagfairOfferSold; /** * Create a new notification with the specified dialogueMessage object * @param dialogueMessage * @returns */ - createNewMessageNotification(dialogueMessage: Message): INotification; + createNewMessageNotification(dialogueMessage: Message): IWsChatMessageReceived; getWebSocketServer(sessionID: string): string; } diff --git a/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts index 55a2c12..a2d3d47 100644 --- a/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/PresetHelper.d.ts @@ -1,16 +1,16 @@ import { IPreset } from "@spt-aki/models/eft/common/IGlobals"; import { BaseClasses } from "@spt-aki/models/enums/BaseClasses"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { ItemHelper } from "./ItemHelper"; export declare class PresetHelper { - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; + protected cloner: ICloner; protected lookup: Record; protected defaultEquipmentPresets: Record; protected defaultWeaponPresets: Record; - constructor(jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper); + constructor(databaseServer: DatabaseServer, itemHelper: ItemHelper, cloner: ICloner); hydratePresetStore(input: Record): void; /** * Get default weapon and equipment presets diff --git a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts index 182806d..9e0c467 100644 --- a/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/ProfileHelper.d.ts @@ -11,13 +11,12 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { ProfileSnapshotService } from "@spt-aki/services/ProfileSnapshotService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; import { Watermark } from "@spt-aki/utils/Watermark"; export declare class ProfileHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected hashUtil: HashUtil; protected watermark: Watermark; protected timeUtil: TimeUtil; @@ -27,8 +26,9 @@ export declare class ProfileHelper { protected profileSnapshotService: ProfileSnapshotService; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, hashUtil: HashUtil, watermark: Watermark, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, itemHelper: ItemHelper, profileSnapshotService: ProfileSnapshotService, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Remove/reset a completed quest condtion from players profile quest data * @param sessionID Session id diff --git a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts index ca7270e..75aaf01 100644 --- a/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/QuestHelper.d.ts @@ -22,12 +22,11 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class QuestHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected hashUtil: HashUtil; protected itemHelper: ItemHelper; @@ -44,8 +43,9 @@ export declare class QuestHelper { protected presetHelper: PresetHelper; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, hashUtil: HashUtil, itemHelper: ItemHelper, questConditionHelper: QuestConditionHelper, eventOutputHolder: EventOutputHolder, databaseServer: DatabaseServer, localeService: LocaleService, ragfairServerHelper: RagfairServerHelper, dialogueHelper: DialogueHelper, profileHelper: ProfileHelper, paymentHelper: PaymentHelper, localisationService: LocalisationService, traderHelper: TraderHelper, presetHelper: PresetHelper, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Get status of a quest in player profile by its id * @param pmcData Profile to search diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts index 55e6fe8..e322b4d 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairHelper.d.ts @@ -10,10 +10,9 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { RagfairLinkedItemService } from "@spt-aki/services/RagfairLinkedItemService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class RagfairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected traderAssortHelper: TraderAssortHelper; protected databaseServer: DatabaseServer; protected handbookHelper: HandbookHelper; @@ -21,8 +20,9 @@ export declare class RagfairHelper { protected ragfairLinkedItemService: RagfairLinkedItemService; protected utilityHelper: UtilityHelper; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer); + constructor(logger: ILogger, traderAssortHelper: TraderAssortHelper, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, ragfairLinkedItemService: RagfairLinkedItemService, utilityHelper: UtilityHelper, configServer: ConfigServer, cloner: ICloner); /** * Gets currency TAG from TPL * @param {string} currency diff --git a/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts index e93a2d8..33f81d0 100644 --- a/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RagfairServerHelper.d.ts @@ -14,8 +14,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { ItemFilterService } from "@spt-aki/services/ItemFilterService"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -33,14 +33,14 @@ export declare class RagfairServerHelper { protected localeService: LocaleService; protected dialogueHelper: DialogueHelper; protected traderHelper: TraderHelper; - protected jsonUtil: JsonUtil; protected mailSendService: MailSendService; protected itemFilterService: ItemFilterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected ragfairConfig: IRagfairConfig; protected questConfig: IQuestConfig; protected static goodsReturnedTemplate: string; - constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, jsonUtil: JsonUtil, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, databaseServer: DatabaseServer, profileHelper: ProfileHelper, itemHelper: ItemHelper, localeService: LocaleService, dialogueHelper: DialogueHelper, traderHelper: TraderHelper, mailSendService: MailSendService, itemFilterService: ItemFilterService, configServer: ConfigServer, cloner: ICloner); /** * Is item valid / on blacklist / quest item * @param itemDetails diff --git a/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts index 9ef0eaa..30a56a6 100644 --- a/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RepairHelper.d.ts @@ -4,16 +4,16 @@ import { IRepairConfig } from "@spt-aki/models/spt/config/IRepairConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class RepairHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected repairConfig: IRepairConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Alter an items durability after a repair by trader/repair kit * @param itemToRepair item to update durability details diff --git a/TypeScript/9RouterHooks/types/helpers/RepeatableQuestHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/RepeatableQuestHelper.d.ts index 6e0290d..8f9ac7b 100644 --- a/TypeScript/9RouterHooks/types/helpers/RepeatableQuestHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/RepeatableQuestHelper.d.ts @@ -1,14 +1,14 @@ import { IEliminationConfig, IQuestConfig, IRepeatableQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { ProbabilityObject, ProbabilityObjectArray } from "@spt-aki/utils/RandomUtil"; export declare class RepeatableQuestHelper { protected mathUtil: MathUtil; - protected jsonUtil: JsonUtil; protected configServer: ConfigServer; + protected cloner: ICloner; protected questConfig: IQuestConfig; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, configServer: ConfigServer); + constructor(mathUtil: MathUtil, configServer: ConfigServer, cloner: ICloner); /** * Get the relevant elimination config based on the current players PMC level * @param pmcLevel Level of PMC character diff --git a/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts index d997dae..3dc7ffb 100644 --- a/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/TradeHelper.d.ts @@ -17,11 +17,10 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { PaymentService } from "@spt-aki/services/PaymentService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HttpResponseUtil } from "@spt-aki/utils/HttpResponseUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class TradeHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected eventOutputHolder: EventOutputHolder; protected traderHelper: TraderHelper; protected itemHelper: ItemHelper; @@ -34,9 +33,10 @@ export declare class TradeHelper { protected traderAssortHelper: TraderAssortHelper; protected traderPurchasePersisterService: TraderPurchasePersisterService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected inventoryConfig: IInventoryConfig; - constructor(logger: ILogger, jsonUtil: JsonUtil, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer); + constructor(logger: ILogger, eventOutputHolder: EventOutputHolder, traderHelper: TraderHelper, itemHelper: ItemHelper, paymentService: PaymentService, fenceService: FenceService, localisationService: LocalisationService, httpResponse: HttpResponseUtil, inventoryHelper: InventoryHelper, ragfairServer: RagfairServer, traderAssortHelper: TraderAssortHelper, traderPurchasePersisterService: TraderPurchasePersisterService, configServer: ConfigServer, cloner: ICloner); /** * Buy item from flea or trader * @param pmcData Player profile diff --git a/TypeScript/9RouterHooks/types/helpers/TraderAssortHelper.d.ts b/TypeScript/9RouterHooks/types/helpers/TraderAssortHelper.d.ts index 0987ff4..33c4c83 100644 --- a/TypeScript/9RouterHooks/types/helpers/TraderAssortHelper.d.ts +++ b/TypeScript/9RouterHooks/types/helpers/TraderAssortHelper.d.ts @@ -14,12 +14,11 @@ import { FenceService } from "@spt-aki/services/FenceService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { TraderAssortService } from "@spt-aki/services/TraderAssortService"; import { TraderPurchasePersisterService } from "@spt-aki/services/TraderPurchasePersisterService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class TraderAssortHelper { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected mathUtil: MathUtil; protected timeUtil: TimeUtil; protected databaseServer: DatabaseServer; @@ -34,10 +33,11 @@ export declare class TraderAssortHelper { protected traderHelper: TraderHelper; protected fenceService: FenceService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; protected mergedQuestAssorts: Record>; protected createdMergedQuestAssorts: boolean; - constructor(logger: ILogger, jsonUtil: JsonUtil, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer); + constructor(logger: ILogger, mathUtil: MathUtil, timeUtil: TimeUtil, databaseServer: DatabaseServer, profileHelper: ProfileHelper, assortHelper: AssortHelper, paymentHelper: PaymentHelper, ragfairAssortGenerator: RagfairAssortGenerator, ragfairOfferGenerator: RagfairOfferGenerator, traderAssortService: TraderAssortService, localisationService: LocalisationService, traderPurchasePersisterService: TraderPurchasePersisterService, traderHelper: TraderHelper, fenceService: FenceService, configServer: ConfigServer, cloner: ICloner); /** * Get a traders assorts * Can be used for returning ragfair / fence assorts diff --git a/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts b/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts index 90f4ea9..fc7ee2b 100644 --- a/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts +++ b/TypeScript/9RouterHooks/types/loaders/BundleLoader.d.ts @@ -1,5 +1,6 @@ import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; import { BundleHashCacheService } from "@spt-aki/services/cache/BundleHashCacheService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { VFS } from "@spt-aki/utils/VFS"; export declare class BundleInfo { @@ -14,8 +15,9 @@ export declare class BundleLoader { protected vfs: VFS; protected jsonUtil: JsonUtil; protected bundleHashCacheService: BundleHashCacheService; + protected cloner: ICloner; protected bundles: Record; - constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService); + constructor(httpServerHelper: HttpServerHelper, vfs: VFS, jsonUtil: JsonUtil, bundleHashCacheService: BundleHashCacheService, cloner: ICloner); /** * Handle singleplayer/bundles */ diff --git a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts index d296b9a..2c12570 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/IGlobals.d.ts @@ -20,6 +20,7 @@ export interface IConfig { armor: IArmor; SessionsToShowHotKeys: number; MaxBotsAliveOnMap: number; + MaxBotsAliveOnMapPvE: number; SavagePlayCooldown: number; SavagePlayCooldownNdaFree: number; MarksmanAccuracy: number; @@ -30,6 +31,7 @@ export interface IConfig { TradingUnlimitedItems: boolean; MaxLoyaltyLevelForAll: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GraphicSettings: IGraphicSettings; TimeBeforeDeploy: number; TimeBeforeDeployLocal: number; @@ -41,6 +43,7 @@ export interface IConfig { BaseUnloadTime: number; BaseCheckTime: number; BluntDamageReduceFromSoftArmorMod: number; + BodyPartColliderSettings: IBodyPartColliderSettings; Customization: ICustomization; UncheckOnShot: boolean; BotsEnabled: boolean; @@ -52,6 +55,7 @@ export interface IConfig { Health: IHealth; rating: IRating; tournament: ITournament; + QuestSettings: IQuestSettings; RagFair: IRagFair; handbook: IHandbook; FractureCausedByFalling: IProbability; @@ -98,6 +102,39 @@ export interface IConfig { Ballistic: IBallistic; RepairSettings: IRepairSettings; } +export interface IBodyPartColliderSettings { + BackHead: IBodyPartColliderPart; + Ears: IBodyPartColliderPart; + Eyes: IBodyPartColliderPart; + HeadCommon: IBodyPartColliderPart; + Jaw: IBodyPartColliderPart; + LeftCalf: IBodyPartColliderPart; + LeftForearm: IBodyPartColliderPart; + LeftSideChestDown: IBodyPartColliderPart; + LeftSideChestUp: IBodyPartColliderPart; + LeftThigh: IBodyPartColliderPart; + LeftUpperArm: IBodyPartColliderPart; + NeckBack: IBodyPartColliderPart; + NeckFront: IBodyPartColliderPart; + ParietalHead: IBodyPartColliderPart; + Pelvis: IBodyPartColliderPart; + PelvisBack: IBodyPartColliderPart; + RibcageLow: IBodyPartColliderPart; + RibcageUp: IBodyPartColliderPart; + RightCalf: IBodyPartColliderPart; + RightForearm: IBodyPartColliderPart; + RightSideChestDown: IBodyPartColliderPart; + RightSideChestUp: IBodyPartColliderPart; + RightThigh: IBodyPartColliderPart; + RightUpperArm: IBodyPartColliderPart; + SpineDown: IBodyPartColliderPart; + SpineTop: IBodyPartColliderPart; +} +export interface IBodyPartColliderPart { + PenetrationChance: number; + PenetrationDamageMod: number; + PenetrationLevel: number; +} export interface IWeaponFastDrawSettings { HandShakeCurveFrequency: number; HandShakeCurveIntensity: number; @@ -159,6 +196,7 @@ export interface IExp { kill: IKill; level: ILevel; loot_attempts: ILootAttempt[]; + expForLevelOneDogtag: number; expForLockedDoorOpen: number; expForLockedDoorBreach: number; triggerMult: number; @@ -580,6 +618,7 @@ export interface IBuffs { Buffs_food_alyonka: IBuff[]; Buffs_food_slippers: IBuff[]; Buffs_knife: IBuff[]; + Buffs_EndOfWinterBonfire: IBuff[]; } export interface IBuff { BuffType: string; @@ -763,6 +802,7 @@ export interface IMaxActiveOfferCount { from: number; to: number; count: number; + countForSpecialEditions: number; } export interface IMaxSumForRarity { Common: IRarityMaxSum; @@ -919,10 +959,24 @@ export interface IBTRSettings { HeightWheelOffset: number; } export interface IBtrMapConfig { + BtrSkin: string; + CheckSurfaceForWheelsTimer: number; + DiameterWheel: number; + HeightWheel: number; + HeightWheelMaxPosLimit: number; + HeightWheelMinPosLimit: number; + HeightWheelOffset: number; + SnapToSurfaceWheelsSpeed: number; + SuspensionDamperStiffness: number; + SuspensionRestLength: number; + SuspensionSpringStiffness: number; + SuspensionTravel: number; + SuspensionWheelRadius: number; mapID: string; - pathsConfigurations: IBtrMapConfig[]; + pathsConfigurations: IPathConfig[]; } -export interface IBtrPathConfig { +export interface IPathConfig { + active: boolean; id: string; enterPoint: string; exitPoint: string; @@ -938,6 +992,8 @@ export interface ISquadSettings { } export interface IInsurance { MaxStorageTimeInHour: number; + CoefOfSendingMessageTime: number; + CoefOfHavingMarkOfUnknown: number; } export interface ISkillsSettings { SkillProgressRate: number; @@ -1329,6 +1385,7 @@ export interface IFenceSettings { paidExitStandingNumerator: number; } export interface IFenceLevel { + ReachOnMarkOnUnknowns: boolean; SavageCooldownModifier: number; ScavCaseTimeModifier: number; PaidExitCostModifier: number; @@ -1469,3 +1526,7 @@ export interface IPreset { /** Default presets have this property */ _encyclopedia?: string; } +export interface IQuestSettings { + GlobalRewardRepModifierDailyQuestPvE: number; + GlobalRewardRepModifierQuestPvE: number; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/common/ILocation.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/ILocation.d.ts index 1fa0a2b..a2ac6d3 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/ILocation.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/ILocation.d.ts @@ -1,9 +1,20 @@ import { Exit, ILocationBase } from "@spt-aki/models/eft/common/ILocationBase"; import { ILooseLoot } from "@spt-aki/models/eft/common/ILooseLoot"; +import { Ixyz } from "./Ixyz"; +import { Item } from "./tables/IItem"; export interface ILocation { + /** Map meta-data */ base: ILocationBase; + /** Loose loot postions and item weights */ looseLoot: ILooseLoot; + /** Static loot item weights */ + staticLoot: Record; + /** Static container postions and item weights */ + staticContainers: IStaticContainerDetails; + staticAmmo: Record; + /** All possible static containers on map + their assign groupings */ statics: IStaticContainer; + /** All possible map extracts */ allExtracts: Exit[]; } export interface IStaticContainer { @@ -19,3 +30,55 @@ export interface IContainerMinMax { export interface IContainerData { groupId: string; } +export interface IStaticLootDetails { + itemcountDistribution: ItemCountDistribution[]; + itemDistribution: ItemDistribution[]; +} +export interface ItemCountDistribution { + count: number; + relativeProbability: number; +} +export interface ItemDistribution { + tpl: string; + relativeProbability: number; +} +export interface IStaticPropsBase { + Id: string; + IsContainer: boolean; + useGravity: boolean; + randomRotation: boolean; + Position: Ixyz; + Rotation: Ixyz; + IsGroupPosition: boolean; + IsAlwaysSpawn: boolean; + GroupPositions: any[]; + Root: string; + Items: any[]; +} +export interface IStaticWeaponProps extends IStaticPropsBase { + Items: Item[]; +} +export interface IStaticContainerDetails { + staticWeapons: IStaticWeaponProps[]; + staticContainers: IStaticContainerData[]; + staticForced: IStaticForcedProps[]; +} +export interface IStaticContainerData { + probability: number; + template: IStaticContainerProps; +} +export interface IStaticAmmoDetails { + tpl: string; + relativeProbability: number; +} +export interface IStaticForcedProps { + containerId: string; + itemTpl: string; +} +export interface IStaticContainerProps extends IStaticPropsBase { + Items: StaticItem[]; +} +export interface StaticItem { + _id: string; + _tpl: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts index 99f5c9c..68f37ae 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/ILocationBase.d.ts @@ -17,6 +17,7 @@ export interface ILocationBase { BotMax: number; BotMaxPlayer: number; BotMaxTimePlayer: number; + BotMaxPvE: number; BotNormal: number; BotSpawnCountStep: number; BotSpawnPeriodCheck: number; @@ -32,6 +33,7 @@ export interface ILocationBase { Enabled: boolean; EnableCoop: boolean; GlobalLootChanceModifier: number; + GlobalLootChanceModifierPvE: number; GlobalContainerChanceModifier: number; IconX: number; IconY: number; @@ -72,6 +74,7 @@ export interface ILocationBase { doors: any[]; EscapeTimeLimit: number; EscapeTimeLimitCoop: number; + EscapeTimeLimitPVE: number; exit_access_time: number; exit_count: number; exit_time: number; @@ -136,6 +139,7 @@ export interface BossLocationSpawn { IgnoreMaxBots?: boolean; Supports?: BossSupport[]; sptId?: string; + spawnMode: string[]; } export interface BossSupport { BossEscortAmount: string; 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 c7c7c94..bf7aa6c 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/IBotBase.d.ts @@ -307,6 +307,9 @@ export interface Productive { ProductionTime?: number; GivenItemsInStart?: string[]; Interrupted?: boolean; + Code?: string; + Decoded?: boolean; + AvailableForFinish?: boolean; /** Used in hideout production.json */ needFuelForAllProductionTime?: boolean; /** Used when sending data to client */ diff --git a/TypeScript/9RouterHooks/types/models/eft/common/tables/ILootBase.d.ts b/TypeScript/9RouterHooks/types/models/eft/common/tables/ILootBase.d.ts deleted file mode 100644 index 0bbb91d..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ILootBase.d.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Ixyz } from "@spt-aki/models/eft/common/Ixyz"; -import { Item } from "@spt-aki/models/eft/common/tables/IItem"; -export interface ILootBase { - staticAmmo: Record; - staticContainers: Record; - staticLoot: Record; -} -export interface IStaticAmmoDetails { - tpl: string; - relativeProbability: number; -} -export interface IStaticContainerDetails { - staticWeapons: IStaticWeaponProps[]; - staticContainers: IStaticContainerData[]; - staticForced: IStaticForcedProps[]; -} -export interface IStaticContainerData { - probability: number; - template: IStaticContainerProps; -} -export interface IStaticPropsBase { - Id: string; - IsContainer: boolean; - useGravity: boolean; - randomRotation: boolean; - Position: Ixyz; - Rotation: Ixyz; - IsGroupPosition: boolean; - IsAlwaysSpawn: boolean; - GroupPositions: any[]; - Root: string; - Items: any[]; -} -export interface IStaticWeaponProps extends IStaticPropsBase { - Items: Item[]; -} -export interface IStaticContainerProps extends IStaticPropsBase { - Items: StaticItem[]; -} -export interface StaticItem { - _id: string; - _tpl: string; -} -export interface IStaticForcedProps { - containerId: string; - itemTpl: string; -} -export interface IStaticLootDetails { - itemcountDistribution: ItemCountDistribution[]; - itemDistribution: ItemDistribution[]; -} -export interface ItemCountDistribution { - count: number; - relativeProbability: number; -} -export interface ItemDistribution { - tpl: string; - relativeProbability: number; -} 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 2ccecbe..0871d1a 100644 --- a/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/common/tables/ITemplateItem.d.ts @@ -63,6 +63,7 @@ export interface Props { DiscardingBlock?: boolean; DropSoundType?: string; RagFairCommissionModifier?: number; + RarityPvE: string; IsAlwaysAvailableForInsurance?: boolean; DiscardLimit?: number; MaxResource?: number; @@ -352,7 +353,8 @@ export interface Props { casingMass?: number; casingSounds?: string; ProjectileCount?: number; - PenetrationChance?: number; + PenetrationChanceObstacle?: number; + PenetrationDamageMod: number; RicochetChance?: number; FragmentationChance?: number; Deterioration?: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts new file mode 100644 index 0000000..d1170d1 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IAddUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IAddUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts new file mode 100644 index 0000000..63b413f --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IChangeGroupMailOwnerRequest.d.ts @@ -0,0 +1,4 @@ +export interface IChangeGroupMailOwnerRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/ICreateGroupMailRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/ICreateGroupMailRequest.d.ts new file mode 100644 index 0000000..176d7f3 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/ICreateGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface ICreateGroupMailRequest { + Name: string; + Users: string[]; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts new file mode 100644 index 0000000..c7582f8 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/dialog/IRemoveUserGroupMailRequest.d.ts @@ -0,0 +1,4 @@ +export interface IRemoveUserGroupMailRequest { + dialogId: string; + uid: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/game/IGameModeRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/game/IGameModeRequestData.d.ts new file mode 100644 index 0000000..618c42d --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/game/IGameModeRequestData.d.ts @@ -0,0 +1,3 @@ +export interface IGameModeRequestData { + sessionMode: string | null; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/game/IGameModeResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/game/IGameModeResponse.d.ts new file mode 100644 index 0000000..eaac690 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/game/IGameModeResponse.d.ts @@ -0,0 +1,8 @@ +export declare enum ESessionMode { + REGULAR = "regular", + PVE = "pve" +} +export interface IGameModeResponse { + gameMode: ESessionMode; + backendUrl: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/game/ISendReportRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/game/ISendReportRequest.d.ts new file mode 100644 index 0000000..b73d95c --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/game/ISendReportRequest.d.ts @@ -0,0 +1,4 @@ +export interface ISendReportRequest { + type: string; + uid: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IAcceptGroupInviteRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IAcceptGroupInviteRequest.d.ts deleted file mode 100644 index 1a4b8f7..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IAcceptGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IAcceptGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IAcceptGroupInviteResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IAcceptGroupInviteResponse.d.ts deleted file mode 100644 index eea1ce6..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IAcceptGroupInviteResponse.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface IAcceptGroupInviteResponse { - _id: string; - aid: number; - Info: PlayerInviteInfo; - isLeader: boolean; - isReady: boolean; -} -export interface PlayerInviteInfo { - Nickname: string; - Side: string; - Level: number; - MemberCategory: number; - GameVersion: string; - SavageLockTime: number; - SavageNickname: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/ICancelGroupInviteRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/ICancelGroupInviteRequest.d.ts deleted file mode 100644 index 71d79c7..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/ICancelGroupInviteRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ICancelGroupInviteRequest { - requestId: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/ICreateGroupRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/ICreateGroupRequestData.d.ts deleted file mode 100644 index 322a095..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/ICreateGroupRequestData.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface ICreateGroupRequestData { - location: string; - raidMode: RaidMode; - startInGroup: boolean; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IDeclineGroupInviteRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IDeclineGroupInviteRequest.d.ts deleted file mode 100644 index 4f46590..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IDeclineGroupInviteRequest.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -export interface IDeclineGroupInviteRequest { -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusRequestData.d.ts deleted file mode 100644 index 28b9500..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { RaidMode } from "@spt-aki/models/enums/RaidMode"; -export interface IGetGroupStatusRequestData { - location: string; - savage: boolean; - dt: string; - keyId: string; - raidMode: RaidMode; - spawnPlace: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusResponse.d.ts deleted file mode 100644 index 8209ef5..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IGetGroupStatusResponse.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; -export interface IGetGroupStatusResponse { - players: IPlayer[]; - maxPveCountExceeded: boolean; -} -export interface IPlayer { - aid: string; - _id: string; - lookingGroup: boolean; - IsLeader: boolean; - IsReady: boolean; - Info: ICurrentGroupMemberInfo; -} -export interface ICurrentGroupMemberInfo { - Nickname: string; - Side: string; - Level: string; - MemberCategory: MemberCategory; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IGetProfileRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IGetProfileRequestData.d.ts deleted file mode 100644 index 86b5bbd..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IGetProfileRequestData.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IGetProfileRequestData { - profileId: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts index bdc9b46..46cb3d8 100644 --- a/TypeScript/9RouterHooks/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/match/IGetRaidConfigurationRequestData.d.ts @@ -1,34 +1,6 @@ -export interface IGetRaidConfigurationRequestData { +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +export interface IGetRaidConfigurationRequestData extends IRaidSettings { keyId: string; - side: string; - location: string; - timeVariant: string; - raidMode: string; - metabolismDisabled: boolean; - playersSpawnPlace: string; - timeAndWeatherSettings: TimeAndWeatherSettings; - botSettings: BotSettings; - wavesSettings: WavesSettings; CanShowGroupPreview: boolean; MaxGroupCount: number; } -export interface TimeAndWeatherSettings { - isRandomTime: boolean; - isRandomWeather: boolean; - cloudinessType: string; - rainType: string; - windType: string; - fogType: string; - timeFlowType: string; - hourOfDay: number; -} -export interface BotSettings { - isScavWars: boolean; - botAmount: string; -} -export interface WavesSettings { - botAmount: string; - botDifficulty: string; - isBosses: boolean; - isTaggedAndCursed: boolean; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IGroupCharacter.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IGroupCharacter.d.ts new file mode 100644 index 0000000..d539afa --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IGroupCharacter.d.ts @@ -0,0 +1,39 @@ +import { Item } from "@spt-aki/models/eft/common/tables/IItem"; +import { MemberCategory } from "@spt-aki/models/enums/MemberCategory"; +export interface IGroupCharacter { + _id: string; + aid: number; + Info: { + Nickname: string; + Side: string; + Level: number; + MemberCategory: MemberCategory; + GameVersion?: string; + SavageLockTime?: number; + SavageNickname?: string; + hasCoopExtension?: boolean; + }; + PlayerVisualRepresentation?: { + Info: { + Side: string; + Level: number; + Nickname: string; + MemberCategory: MemberCategory; + GameVersion: string; + }; + Customization: { + Head: string; + Body: string; + Feet: string; + Hands: string; + }; + Equipment: { + Id: string; + Items: Item[]; + }; + }; + isLeader: boolean; + isReady?: boolean; + region?: string; + lookingGroup?: boolean; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchRequestData.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchRequestData.d.ts deleted file mode 100644 index b9b7568..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchRequestData.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface IJoinMatchRequestData { - groupid: string; - servers: Server[]; -} -export interface Server { - ping: number; - ip: string; - port: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchResult.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchResult.d.ts deleted file mode 100644 index e0e867f..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IJoinMatchResult.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface IJoinMatchResult { - maxPveCountExceeded: boolean; - profiles: IJoinMatchPlayerProfile[]; -} -export interface IJoinMatchPlayerProfile { - profileid: string; - profileToken: string; - status: string; - sid: string; - ip: string; - port: number; - version: string; - location: string; - raidMode: string; - mode: string; - shortid: string; - additional_info: any[]; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupCurrentResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupCurrentResponse.d.ts new file mode 100644 index 0000000..7b4ad63 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupCurrentResponse.d.ts @@ -0,0 +1,4 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupCurrentResponse { + squad: IGroupCharacter[]; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts new file mode 100644 index 0000000..e03cb90 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupInviteSendRequest.d.ts @@ -0,0 +1,4 @@ +export interface IMatchGroupInviteSendRequest { + to: string; + inLobby: boolean; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts new file mode 100644 index 0000000..623eadb --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupPlayerRemoveRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupPlayerRemoveRequest { + aidToKick: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStartGameRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStartGameRequest.d.ts new file mode 100644 index 0000000..d932de0 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStartGameRequest.d.ts @@ -0,0 +1,5 @@ +import { IServer } from "@spt-aki/models/eft/match/IServer"; +export interface IMatchGroupStartGameRequest { + groupId: string; + servers: IServer[]; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStatusRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStatusRequest.d.ts new file mode 100644 index 0000000..c5fc71d --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStatusRequest.d.ts @@ -0,0 +1,9 @@ +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IMatchGroupStatusRequest { + location: string; + savage: boolean; + dt: string; + keyId: string; + raidMode: RaidMode; + spawnPlace: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStatusResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStatusResponse.d.ts new file mode 100644 index 0000000..c493650 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +export interface IMatchGroupStatusResponse { + players: IGroupCharacter[]; + maxPveCountExceeded: boolean; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupTransferRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupTransferRequest.d.ts new file mode 100644 index 0000000..4476387 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IMatchGroupTransferRequest.d.ts @@ -0,0 +1,3 @@ +export interface IMatchGroupTransferRequest { + aidToChange: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IProfileStatusRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IProfileStatusRequest.d.ts new file mode 100644 index 0000000..0667a99 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IProfileStatusRequest.d.ts @@ -0,0 +1,3 @@ +export interface IProfileStatusRequest { + groupId: number; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IProfileStatusResponse.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IProfileStatusResponse.d.ts new file mode 100644 index 0000000..ac1a324 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IProfileStatusResponse.d.ts @@ -0,0 +1,5 @@ +import { ISessionStatus } from "@spt-aki/models/eft/match/ISessionStatus"; +export interface IProfileStatusResponse { + maxPveCountExceeded: boolean; + profiles: ISessionStatus[]; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IRaidSettings.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IRaidSettings.d.ts new file mode 100644 index 0000000..9bf0d42 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IRaidSettings.d.ts @@ -0,0 +1,42 @@ +import { DateTime } from "@spt-aki/models/enums/DateTime"; +import { PlayersSpawnPlace } from "@spt-aki/models/enums/PlayersSpawnPlace"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +import { BotAmount } from "@spt-aki/models/enums/RaidSettings/BotAmount"; +import { BotDifficulty } from "@spt-aki/models/enums/RaidSettings/BotDifficulty"; +import { CloudinessType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/CloudinessType"; +import { FogType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/FogType"; +import { RainType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/RainType"; +import { TimeFlowType } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/TimeFlowType"; +import { WindSpeed } from "@spt-aki/models/enums/RaidSettings/TimeAndWeather/WindSpeed"; +import { SideType } from "@spt-aki/models/enums/SideType"; +export interface IRaidSettings { + location: string; + timeVariant: DateTime; + raidMode: RaidMode; + metabolismDisabled: boolean; + playersSpawnPlace: PlayersSpawnPlace; + timeAndWeatherSettings: TimeAndWeatherSettings; + botSettings: BotSettings; + wavesSettings: WavesSettings; + side: SideType; +} +export interface TimeAndWeatherSettings { + isRandomTime: boolean; + isRandomWeather: boolean; + cloudinessType: CloudinessType; + rainType: RainType; + fogType: FogType; + windType: WindSpeed; + timeFlowType: TimeFlowType; + hourOfDay: number; +} +export interface BotSettings { + isScavWars: boolean; + botAmount: BotAmount; +} +export interface WavesSettings { + botAmount: BotAmount; + botDifficulty: BotDifficulty; + isBosses: boolean; + isTaggedAndCursed: boolean; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts deleted file mode 100644 index 4877c54..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/IRemovePlayerFromGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface IRemovePlayerFromGroupRequest { - aidToKick: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IRequestIdRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IRequestIdRequest.d.ts new file mode 100644 index 0000000..755ca1b --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IRequestIdRequest.d.ts @@ -0,0 +1,3 @@ +export interface IRequestIdRequest { + requestId: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/ISendGroupInviteRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/ISendGroupInviteRequest.d.ts deleted file mode 100644 index 66d3d0e..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/ISendGroupInviteRequest.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ISendGroupInviteRequest { - to: string; - inLobby: boolean; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/IServer.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/IServer.d.ts new file mode 100644 index 0000000..d7c30d8 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/IServer.d.ts @@ -0,0 +1,5 @@ +export interface IServer { + ping: number; + ip: string; + port: number; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/ISessionStatus.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/ISessionStatus.d.ts new file mode 100644 index 0000000..c745cbf --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/match/ISessionStatus.d.ts @@ -0,0 +1,14 @@ +export interface ISessionStatus { + profileid: string; + profileToken: string; + status: string; + ip: string; + port: number; + sid: string; + version?: string; + location?: string; + raidMode?: string; + mode?: string; + shortId?: string; + additional_info?: any[]; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/match/ITransferGroupRequest.d.ts b/TypeScript/9RouterHooks/types/models/eft/match/ITransferGroupRequest.d.ts deleted file mode 100644 index e17c2a8..0000000 --- a/TypeScript/9RouterHooks/types/models/eft/match/ITransferGroupRequest.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ITransferGroupRequest { - aidToChange: string; -} diff --git a/TypeScript/9RouterHooks/types/models/eft/notifier/INotifier.d.ts b/TypeScript/9RouterHooks/types/models/eft/notifier/INotifier.d.ts index 74343d8..4ead272 100644 --- a/TypeScript/9RouterHooks/types/models/eft/notifier/INotifier.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/notifier/INotifier.d.ts @@ -1,4 +1,3 @@ -import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; export interface INotifierChannel { server: string; channel_id: string; @@ -6,19 +5,3 @@ export interface INotifierChannel { notifierServer: string; ws: string; } -export interface INotification { - type: NotificationType; - eventId: string; - dialogId?: string; - message?: Message; -} -export declare enum NotificationType { - RAGFAIR_OFFER_SOLD = "RagfairOfferSold", - RAGFAIR_RATING_CHANGE = "RagfairRatingChange", - /** ChatMessageReceived */ - NEW_MESSAGE = "new_message", - PING = "ping", - TRADER_SUPPLY = "TraderSupply", - TRADER_STANDING = "TraderStanding", - UNLOCK_TRADER = "UnlockTrader" -} diff --git a/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts b/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts index 441308f..a6d06bb 100644 --- a/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/profile/IAkiProfile.d.ts @@ -112,6 +112,7 @@ export interface Message { Member?: IUpdatableChatMember; templateId?: string; text?: string; + replyTo?: IReplyTo; hasRewards?: boolean; rewardCollected: boolean; items?: MessageItems; @@ -119,6 +120,13 @@ export interface Message { systemData?: ISystemData; profileChangeEvents?: IProfileChangeEvent[]; } +export interface IReplyTo { + _id: string; + uid: string; + type: MessageType; + dt: number; + text?: string; +} export interface MessagePreview { uid: string; type: MessageType; diff --git a/TypeScript/9RouterHooks/types/models/eft/weather/IWeatherData.d.ts b/TypeScript/9RouterHooks/types/models/eft/weather/IWeatherData.d.ts index cae98f1..59a63fc 100644 --- a/TypeScript/9RouterHooks/types/models/eft/weather/IWeatherData.d.ts +++ b/TypeScript/9RouterHooks/types/models/eft/weather/IWeatherData.d.ts @@ -1,10 +1,11 @@ +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; export interface IWeatherData { acceleration: number; time: string; date: string; - weather?: IWeather; - winterEventEnabled: boolean; + weather: IWeather; + season: Season; } export interface IWeather { pressure: number; diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsAid.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsAid.d.ts new file mode 100644 index 0000000..d053788 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsAid.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAid extends IWsNotificationEvent { + aid: number; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsAidNickname.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsAidNickname.d.ts new file mode 100644 index 0000000..82e91ac --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsAidNickname.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsAidNickname extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts new file mode 100644 index 0000000..74f9d0c --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsChatMessageReceived.d.ts @@ -0,0 +1,8 @@ +import { Message } from "@spt-aki/models/eft/profile/IAkiProfile"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsChatMessageReceived extends IWsNotificationEvent { + dialogId: string; + message: Message; + profiles?: IGroupCharacter[]; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupId.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupId.d.ts new file mode 100644 index 0000000..2bab478 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupId.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupId extends IWsNotificationEvent { + groupId: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts new file mode 100644 index 0000000..db30348 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteAccept.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IGroupCharacter } from "../match/IGroupCharacter"; +export interface IWsGroupMatchInviteAccept extends IWsNotificationEvent, IGroupCharacter { +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts new file mode 100644 index 0000000..368b945 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteDecline.d.ts @@ -0,0 +1,5 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteDecline extends IWsNotificationEvent { + aid: number; + Nickname: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts new file mode 100644 index 0000000..32174fd --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchInviteSend.d.ts @@ -0,0 +1,7 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchInviteSend extends IWsNotificationEvent { + requestId: string; + from: number; + members: IGroupCharacter[]; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts new file mode 100644 index 0000000..73e88cd --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchLeaderChanged.d.ts @@ -0,0 +1,4 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchLeaderChanged extends IWsNotificationEvent { + owner: number; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts new file mode 100644 index 0000000..1d9f604 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchRaidReady.d.ts @@ -0,0 +1,5 @@ +import { IGroupCharacter } from "@spt-aki/models/eft/match/IGroupCharacter"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidReady extends IWsNotificationEvent { + extendedProfile: IGroupCharacter; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts new file mode 100644 index 0000000..f323220 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsGroupMatchRaidSettings.d.ts @@ -0,0 +1,5 @@ +import { IRaidSettings } from "@spt-aki/models/eft/match/IRaidSettings"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsGroupMatchRaidSettings extends IWsNotificationEvent { + raidSettings: IRaidSettings; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsNotificationEvent.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsNotificationEvent.d.ts new file mode 100644 index 0000000..5fc72f3 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsNotificationEvent.d.ts @@ -0,0 +1,4 @@ +export interface IWsNotificationEvent { + type: string; + eventId: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsPing.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsPing.d.ts new file mode 100644 index 0000000..a7bb0ea --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsPing.d.ts @@ -0,0 +1,3 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsPing extends IWsNotificationEvent { +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsRagfairOfferSold.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsRagfairOfferSold.d.ts new file mode 100644 index 0000000..5f251e9 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsRagfairOfferSold.d.ts @@ -0,0 +1,6 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +export interface IWsRagfairOfferSold extends IWsNotificationEvent { + offerId: string; + count: number; + handbookId: string; +} diff --git a/TypeScript/9RouterHooks/types/models/eft/ws/IWsUserConfirmed.d.ts b/TypeScript/9RouterHooks/types/models/eft/ws/IWsUserConfirmed.d.ts new file mode 100644 index 0000000..dd6f5fd --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/eft/ws/IWsUserConfirmed.d.ts @@ -0,0 +1,17 @@ +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { ProfileStatus } from "@spt-aki/models/enums/ProfileStatus"; +import { RaidMode } from "@spt-aki/models/enums/RaidMode"; +export interface IWsUserConfirmed extends IWsNotificationEvent { + profileid: string; + profileToken: string; + status: ProfileStatus; + ip: string; + port: number; + sid: string; + version: string; + location: string; + raidMode: RaidMode; + mode: string; + shortId: string; + additional_info: any[]; +} diff --git a/TypeScript/9RouterHooks/types/models/enums/BotAmount.d.ts b/TypeScript/9RouterHooks/types/models/enums/BotAmount.d.ts deleted file mode 100644 index 9ef9cab..0000000 --- a/TypeScript/9RouterHooks/types/models/enums/BotAmount.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -export declare enum BotAmount { - AS_ONLINE = "AsOnline", - LOW = "Low", - MEDIUM = "Medium", - HIGH = "High", - HORDE = "Horde" -} diff --git a/TypeScript/9RouterHooks/types/models/enums/DateTime.d.ts b/TypeScript/9RouterHooks/types/models/enums/DateTime.d.ts new file mode 100644 index 0000000..dcd1b5e --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/DateTime.d.ts @@ -0,0 +1,4 @@ +export declare enum DateTime { + CURR = "CURR", + PAST = "PAST" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/NotificationEventType.d.ts b/TypeScript/9RouterHooks/types/models/enums/NotificationEventType.d.ts new file mode 100644 index 0000000..51f0d4e --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/NotificationEventType.d.ts @@ -0,0 +1,28 @@ +export declare enum NotificationEventType { + RAGFAIR_OFFER_SOLD = "RagfairOfferSold", + RAGFAIR_RATING_CHANGE = "RagfairRatingChange", + CHAT_MESSAGE_RECEIVED = "new_message", + PING = "ping", + TRADER_SUPPLY = "TraderSupply", + TRADER_STANDING = "TraderStanding", + UNLOCK_TRADER = "UnlockTrader", + GROUP_MATCH_RAID_SETTINGS = "groupMatchRaidSettings", + GROUP_MATCH_RAID_NOT_READY = "groupMatchRaidNotReady", + GROUP_MATCH_RAID_READY = "groupMatchRaidReady", + GROUP_MATCH_INVITE_ACCEPT = "groupMatchInviteAccept", + GROUP_MATCH_INVITE_DECLINE = "groupMatchInviteDecline", + GROUP_MATCH_INVITE_SEND = "groupMatchInviteSend", + GROUP_MATCH_LEADER_CHANGED = "groupMatchLeaderChanged", + GROUP_MATCH_START_GAME = "groupMatchStartGame", + GROUP_MATCH_USER_LEAVE = "groupMatchUserLeave", + GROUP_MATCH_WAS_REMOVED = "groupMatchWasRemoved", + GROUP_MATCH_USER_BAD_VERSION = "groupMatchUserHasBadVersion", + USER_CONFIRMED = "userConfirmed", + CHANNEL_DELETED = "channel_deleted", + FRIEND_LIST_REQUEST_ACCEPTED = "friendListRequestAccept", + FRIEND_LIST_REQUEST_DECLINED = "friendListRequestDecline", + FRIEND_LIST_NEW_REQUEST = "friendListNewRequest", + FRIEND_LIST_REMOVED_FROM_FRIEND_LIST = "youAreRemovedFromFriendList", + YOU_ARE_ADDED_TO_IGNORE_LIST = "YouWereAddedToIgnoreList", + YOU_ARE_REMOVED_FROM_IGNORE_LIST = "youAreRemoveFromIgnoreList" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/PlayersSpawnPlace.d.ts b/TypeScript/9RouterHooks/types/models/enums/PlayersSpawnPlace.d.ts new file mode 100644 index 0000000..8a2eab6 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/PlayersSpawnPlace.d.ts @@ -0,0 +1,5 @@ +export declare enum PlayersSpawnPlace { + SAME_PLACE = "SamePlace", + DIFFERENT_PLACES = "DifferentPlaces", + AT_THE_ENDS_OF_THE_MAP = "AtTheEndsOfTheMap" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/ProfileStatus.d.ts b/TypeScript/9RouterHooks/types/models/enums/ProfileStatus.d.ts new file mode 100644 index 0000000..5a4419b --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/ProfileStatus.d.ts @@ -0,0 +1,7 @@ +export declare enum ProfileStatus { + FREE = "Free", + MATCH_WAIT = "MatchWait", + BUSY = "Busy", + LEAVING = "Leaving", + TRANSFER = "Transfer" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/QuestRewardType.d.ts b/TypeScript/9RouterHooks/types/models/enums/QuestRewardType.d.ts index fee0ad2..3f01040 100644 --- a/TypeScript/9RouterHooks/types/models/enums/QuestRewardType.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/QuestRewardType.d.ts @@ -8,5 +8,6 @@ export declare enum QuestRewardType { PRODUCTIONS_SCHEME = "ProductionScheme", TRADER_STANDING_RESET = "TraderStandingReset", TRADER_STANDING_RESTORE = "TraderStandingRestore", - STASH_ROWS = "StashRows" + STASH_ROWS = "StashRows", + ACHIEVEMENT = "Achievement" } diff --git a/TypeScript/9RouterHooks/types/models/enums/RaidSettings/BotAmount.d.ts b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/BotAmount.d.ts new file mode 100644 index 0000000..ad7b6f0 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/BotAmount.d.ts @@ -0,0 +1,8 @@ +export declare enum BotAmount { + AS_ONLINE = "AsOnline", + NO_BOTS = "NoBots", + LOW = "Low", + MEDIUM = "Medium", + HIGH = "High", + HORDE = "Horde" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/BotDifficulty.d.ts b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/BotDifficulty.d.ts similarity index 100% rename from TypeScript/9RouterHooks/types/models/enums/BotDifficulty.d.ts rename to TypeScript/9RouterHooks/types/models/enums/RaidSettings/BotDifficulty.d.ts diff --git a/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts new file mode 100644 index 0000000..3bd9d9c --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/CloudinessType.d.ts @@ -0,0 +1,8 @@ +export declare enum CloudinessType { + CLEAR = "Clear", + PARTLY_CLOUDY = "PartlyCloudy", + CLOUDY = "Cloudy", + CLOUDY_WITH_GAPS = "CloudyWithGaps", + HEAVY_CLOUD_COVER = "HeavyCloudCover", + THUNDER_CLOUD = "Thundercloud" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts new file mode 100644 index 0000000..8ee3025 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/FogType.d.ts @@ -0,0 +1,7 @@ +export declare enum FogType { + NO_FOG = "NoFog", + FAINT = "Faint", + FOG = "Fog", + HEAVY = "Heavy", + CONTINUOUS = "Continuous" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts new file mode 100644 index 0000000..1e9a70e --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/RainType.d.ts @@ -0,0 +1,7 @@ +export declare enum RainType { + NO_RAIN = "NoRain", + DRIZZLING = "Drizzling", + RAIN = "Rain", + HEAVY = "Heavy", + SHOWER = "Shower" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts new file mode 100644 index 0000000..b153fb5 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/TimeFlowType.d.ts @@ -0,0 +1,10 @@ +export declare enum TimeFlowType { + X0 = "x0", + X0_14 = "x0_14", + X0_25 = "x0_25", + X0_5 = "x0_5", + X1 = "x1", + X2 = "x2", + X4 = "x4", + X8 = "x8" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts new file mode 100644 index 0000000..6cc9973 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/RaidSettings/TimeAndWeather/WindSpeed.d.ts @@ -0,0 +1,7 @@ +export declare enum WindSpeed { + LIGHT = "Light", + MODERATE = "Moderate", + STRONG = "Strong", + VERY_STRONG = "VeryStrong", + HURRICANE = "Hurricane" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/Season.d.ts b/TypeScript/9RouterHooks/types/models/enums/Season.d.ts new file mode 100644 index 0000000..b1d3662 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/Season.d.ts @@ -0,0 +1,7 @@ +export declare enum Season { + SUMMER = 0, + AUTUMN = 1, + WINTER = 2, + SPRING = 3, + STORM = 4 +} diff --git a/TypeScript/9RouterHooks/types/models/enums/SideType.d.ts b/TypeScript/9RouterHooks/types/models/enums/SideType.d.ts new file mode 100644 index 0000000..faa6ff6 --- /dev/null +++ b/TypeScript/9RouterHooks/types/models/enums/SideType.d.ts @@ -0,0 +1,5 @@ +export declare enum SideType { + PMC = "Pmc", + SAVAGE = "Savage", + RANDOM = "Random" +} diff --git a/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts b/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts index 19b95d5..80d737e 100644 --- a/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts +++ b/TypeScript/9RouterHooks/types/models/enums/WildSpawnTypeNumber.d.ts @@ -45,6 +45,12 @@ export declare enum WildSpawnTypeNumber { FOLLOWERKOLONTAYASSAULT = 44, FOLLOWERKOLONTAYSECURITY = 45, SHOOTERBTR = 46, - SPTUSEC = 47, - SPTBEAR = 48 + SPIRITWINTER = 47, + SPIRITSPRING = 48, + PMCBEAR = 49, + PMCUSEC = 50, + skier = 51, + peacemaker = 52, + SPTUSEC = 100, + SPTBEAR = 101 } diff --git a/TypeScript/9RouterHooks/types/models/spt/bots/BotGenerationDetails.d.ts b/TypeScript/9RouterHooks/types/models/spt/bots/BotGenerationDetails.d.ts index 7ea9d7e..2a7a64e 100644 --- a/TypeScript/9RouterHooks/types/models/spt/bots/BotGenerationDetails.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/bots/BotGenerationDetails.d.ts @@ -1,3 +1,4 @@ +import { MinMax } from "@spt-aki/models/common/MinMax"; export interface BotGenerationDetails { /** Should the bot be generated as a PMC */ isPmc: boolean; @@ -8,6 +9,8 @@ export interface BotGenerationDetails { /** Active players current level */ playerLevel?: number; playerName?: string; + /** Level specific overrides for PMC level */ + locationSpecificPmcLevelOverride?: MinMax; /** Delta of highest level of bot e.g. 50 means 50 levels above player */ botRelativeLevelDeltaMax: number; /** Delta of lowest level of bot e.g. 50 means 50 levels below player */ diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts index f17d3e4..89223b2 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IPmcConfig.d.ts @@ -46,6 +46,7 @@ export interface IPmcConfig extends IBaseConfig { /** Force a number of healing items into PMCs secure container to ensure they can heal */ forceHealingItemsIntoSecure: boolean; allPMCsHavePlayerNameWithRandomPrefixChance: number; + locationSpecificPmcLevelOverride: Record; /** Should secure container loot from usec.json/bear.json be added to pmc bots secure */ addSecureContainerLootFromBotConfig: boolean; } diff --git a/TypeScript/9RouterHooks/types/models/spt/config/IWeatherConfig.d.ts b/TypeScript/9RouterHooks/types/models/spt/config/IWeatherConfig.d.ts index 3e8f282..845cb77 100644 --- a/TypeScript/9RouterHooks/types/models/spt/config/IWeatherConfig.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/config/IWeatherConfig.d.ts @@ -1,11 +1,21 @@ import { MinMax } from "@spt-aki/models/common/MinMax"; +import { Season } from "@spt-aki/models/enums/Season"; import { WindDirection } from "@spt-aki/models/enums/WindDirection"; import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig"; export interface IWeatherConfig extends IBaseConfig { kind: "aki-weather"; acceleration: number; weather: Weather; - forceWinterEvent: boolean; + seasonDates: ISeasonDateTimes[]; + overrideSeason?: Season; +} +export interface ISeasonDateTimes { + seasonType: Season; + name: string; + startDay: number; + startMonth: number; + endDay: number; + endMonth: number; } export interface Weather { clouds: WeatherSettings; diff --git a/TypeScript/9RouterHooks/types/models/spt/generators/ILocationGenerator.d.ts b/TypeScript/9RouterHooks/types/models/spt/generators/ILocationGenerator.d.ts index 347d5fa..781e575 100644 --- a/TypeScript/9RouterHooks/types/models/spt/generators/ILocationGenerator.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/generators/ILocationGenerator.d.ts @@ -1,5 +1,5 @@ +import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/ILocation"; import { ILooseLoot, SpawnpointTemplate } from "@spt-aki/models/eft/common/ILooseLoot"; -import { IStaticAmmoDetails, IStaticContainerProps, IStaticForcedProps, IStaticLootDetails } from "@spt-aki/models/eft/common/tables/ILootBase"; export interface ILocationGenerator { generateContainerLoot(containerIn: IStaticContainerProps, staticForced: IStaticForcedProps[], staticLootDist: Record, staticAmmoDist: Record, locationName: string): IStaticContainerProps; generateDynamicLoot(dynamicLootDist: ILooseLoot, staticAmmoDist: Record, locationName: string): SpawnpointTemplate[]; diff --git a/TypeScript/9RouterHooks/types/models/spt/server/ExhaustableArray.d.ts b/TypeScript/9RouterHooks/types/models/spt/server/ExhaustableArray.d.ts index 9f73b97..c7801eb 100644 --- a/TypeScript/9RouterHooks/types/models/spt/server/ExhaustableArray.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/server/ExhaustableArray.d.ts @@ -1,11 +1,11 @@ -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class ExhaustableArray implements IExhaustableArray { private itemPool; private randomUtil; - private jsonUtil; + private cloner; private pool; - constructor(itemPool: T[], randomUtil: RandomUtil, jsonUtil: JsonUtil); + constructor(itemPool: T[], randomUtil: RandomUtil, cloner: ICloner); getRandomValue(): T; getFirstValue(): T; hasValues(): boolean; diff --git a/TypeScript/9RouterHooks/types/models/spt/server/IDatabaseTables.d.ts b/TypeScript/9RouterHooks/types/models/spt/server/IDatabaseTables.d.ts index 8f0ff07..1140374 100644 --- a/TypeScript/9RouterHooks/types/models/spt/server/IDatabaseTables.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/server/IDatabaseTables.d.ts @@ -5,7 +5,6 @@ import { IBotCore } from "@spt-aki/models/eft/common/tables/IBotCore"; import { IBotType } from "@spt-aki/models/eft/common/tables/IBotType"; import { ICustomizationItem } from "@spt-aki/models/eft/common/tables/ICustomizationItem"; import { IHandbookBase } from "@spt-aki/models/eft/common/tables/IHandbookBase"; -import { ILootBase } from "@spt-aki/models/eft/common/tables/ILootBase"; import { IMatch } from "@spt-aki/models/eft/common/tables/IMatch"; import { IProfileTemplates } from "@spt-aki/models/eft/common/tables/IProfileTemplate"; import { IQuest } from "@spt-aki/models/eft/common/tables/IQuest"; @@ -37,7 +36,6 @@ export interface IDatabaseTables { }; locales?: ILocaleBase; locations?: ILocations; - loot?: ILootBase; match?: IMatch; templates?: { character: string[]; diff --git a/TypeScript/9RouterHooks/types/models/spt/server/ILocations.d.ts b/TypeScript/9RouterHooks/types/models/spt/server/ILocations.d.ts index a52242f..0101dd7 100644 --- a/TypeScript/9RouterHooks/types/models/spt/server/ILocations.d.ts +++ b/TypeScript/9RouterHooks/types/models/spt/server/ILocations.d.ts @@ -18,6 +18,7 @@ export interface ILocations { town?: ILocation; woods?: ILocation; sandbox?: ILocation; + sandbox_high?: ILocation; /** Holds a mapping of the linkages between locations on the UI */ base?: ILocationsBase; } diff --git a/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts b/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts index 8ee10ef..2a7cd70 100644 --- a/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts +++ b/TypeScript/9RouterHooks/types/routers/EventOutputHolder.d.ts @@ -3,17 +3,17 @@ import { IPmcData } from "@spt-aki/models/eft/common/IPmcData"; import { IHideoutImprovement, Productive, TraderInfo } from "@spt-aki/models/eft/common/tables/IBotBase"; import { TraderData } from "@spt-aki/models/eft/itemEvent/IItemEventRouterBase"; import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEventRouterResponse"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class EventOutputHolder { - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected timeUtil: TimeUtil; + protected cloner: ICloner; /** What has client been informed of this game session */ protected clientActiveSessionStorage: Record; - constructor(jsonUtil: JsonUtil, profileHelper: ProfileHelper, timeUtil: TimeUtil); + constructor(profileHelper: ProfileHelper, timeUtil: TimeUtil, cloner: ICloner); protected output: IItemEventRouterResponse; getOutput(sessionID: string): IItemEventRouterResponse; /** diff --git a/TypeScript/9RouterHooks/types/routers/HttpRouter.d.ts b/TypeScript/9RouterHooks/types/routers/HttpRouter.d.ts index 875182d..7de8b20 100644 --- a/TypeScript/9RouterHooks/types/routers/HttpRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/HttpRouter.d.ts @@ -6,8 +6,8 @@ export declare class HttpRouter { protected dynamicRoutes: DynamicRouter[]; constructor(staticRouters: StaticRouter[], dynamicRoutes: DynamicRouter[]); protected groupBy(list: T[], keyGetter: (t: T) => string): Map; - getResponse(req: IncomingMessage, info: any, sessionID: string): string; - protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): boolean; + getResponse(req: IncomingMessage, info: any, sessionID: string): Promise; + protected handleRoute(url: string, info: any, sessionID: string, wrapper: ResponseWrapper, routers: Router[], dynamic: boolean): Promise; } declare class ResponseWrapper { output: string; diff --git a/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts index ef0a251..fa154ef 100644 --- a/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/ItemEventRouter.d.ts @@ -5,19 +5,19 @@ import { IItemEventRouterResponse } from "@spt-aki/models/eft/itemEvent/IItemEve import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { EventOutputHolder } from "@spt-aki/routers/EventOutputHolder"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ItemEventRouter { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected profileHelper: ProfileHelper; protected itemEventRouters: ItemEventRouterDefinition[]; protected localisationService: LocalisationService; protected eventOutputHolder: EventOutputHolder; - constructor(logger: ILogger, jsonUtil: JsonUtil, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder); + protected cloner: ICloner; + constructor(logger: ILogger, profileHelper: ProfileHelper, itemEventRouters: ItemEventRouterDefinition[], localisationService: LocalisationService, eventOutputHolder: EventOutputHolder, cloner: ICloner); /** * @param info Event request * @param sessionID Session id * @returns Item response */ - handleEvents(info: IItemEventRouterRequest, sessionID: string): IItemEventRouterResponse; + handleEvents(info: IItemEventRouterRequest, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/CustomizationItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/CustomizationItemEventRouter.d.ts index 473c8ed..02f5ff9 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/CustomizationItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/CustomizationItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class CustomizationItemEventRouter extends ItemEventRouterDefinit protected customizationCallbacks: CustomizationCallbacks; constructor(customizationCallbacks: CustomizationCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/HealthItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/HealthItemEventRouter.d.ts index 5243153..d082053 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/HealthItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/HealthItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HealthItemEventRouter extends ItemEventRouterDefinition { protected healthCallbacks: HealthCallbacks; constructor(healthCallbacks: HealthCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/HideoutItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/HideoutItemEventRouter.d.ts index 14aeddc..9d1a604 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/HideoutItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/HideoutItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class HideoutItemEventRouter extends ItemEventRouterDefinition { protected hideoutCallbacks: HideoutCallbacks; constructor(hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/InsuranceItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/InsuranceItemEventRouter.d.ts index f2c9ab6..7ff4d30 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/InsuranceItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/InsuranceItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class InsuranceItemEventRouter extends ItemEventRouterDefinition protected insuranceCallbacks: InsuranceCallbacks; constructor(insuranceCallbacks: InsuranceCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/InventoryItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/InventoryItemEventRouter.d.ts index 22fddbf..98c5376 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/InventoryItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/InventoryItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class InventoryItemEventRouter extends ItemEventRouterDefinition protected hideoutCallbacks: HideoutCallbacks; constructor(inventoryCallbacks: InventoryCallbacks, hideoutCallbacks: HideoutCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string, output: IItemEventRouterResponse): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/NoteItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/NoteItemEventRouter.d.ts index 35907cc..88102be 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/NoteItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/NoteItemEventRouter.d.ts @@ -7,5 +7,5 @@ export declare class NoteItemEventRouter extends ItemEventRouterDefinition { protected noteCallbacks: NoteCallbacks; constructor(noteCallbacks: NoteCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: INoteActionData, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/QuestItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/QuestItemEventRouter.d.ts index 32715e5..8ef3360 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/QuestItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/QuestItemEventRouter.d.ts @@ -8,5 +8,5 @@ export declare class QuestItemEventRouter extends ItemEventRouterDefinition { protected questCallbacks: QuestCallbacks; constructor(logger: ILogger, questCallbacks: QuestCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(eventAction: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/RagfairItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/RagfairItemEventRouter.d.ts index b8cf48c..f1cf326 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/RagfairItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/RagfairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RagfairItemEventRouter extends ItemEventRouterDefinition { protected ragfairCallbacks: RagfairCallbacks; constructor(ragfairCallbacks: RagfairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/RepairItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/RepairItemEventRouter.d.ts index 282c47a..e901dad 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/RepairItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/RepairItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class RepairItemEventRouter extends ItemEventRouterDefinition { protected repairCallbacks: RepairCallbacks; constructor(repairCallbacks: RepairCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/TradeItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/TradeItemEventRouter.d.ts index 1494963..e998e48 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/TradeItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/TradeItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class TradeItemEventRouter extends ItemEventRouterDefinition { protected tradeCallbacks: TradeCallbacks; constructor(tradeCallbacks: TradeCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/routers/item_events/WishlistItemEventRouter.d.ts b/TypeScript/9RouterHooks/types/routers/item_events/WishlistItemEventRouter.d.ts index 1d6f601..de60c39 100644 --- a/TypeScript/9RouterHooks/types/routers/item_events/WishlistItemEventRouter.d.ts +++ b/TypeScript/9RouterHooks/types/routers/item_events/WishlistItemEventRouter.d.ts @@ -6,5 +6,5 @@ export declare class WishlistItemEventRouter extends ItemEventRouterDefinition { protected wishlistCallbacks: WishlistCallbacks; constructor(wishlistCallbacks: WishlistCallbacks); getHandledRoutes(): HandledRoute[]; - handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): IItemEventRouterResponse; + handleItemEvent(url: string, pmcData: IPmcData, body: any, sessionID: string): Promise; } diff --git a/TypeScript/9RouterHooks/types/servers/WebSocketServer.d.ts b/TypeScript/9RouterHooks/types/servers/WebSocketServer.d.ts index b73f22e..4200b5a 100644 --- a/TypeScript/9RouterHooks/types/servers/WebSocketServer.d.ts +++ b/TypeScript/9RouterHooks/types/servers/WebSocketServer.d.ts @@ -1,34 +1,23 @@ /// import http, { IncomingMessage } from "node:http"; -import WebSocket from "ws"; +import { WebSocket, Server } from "ws"; import { HttpServerHelper } from "@spt-aki/helpers/HttpServerHelper"; -import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; -import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; +import { IWebSocketConnectionHandler } from "./ws/IWebSocketConnectionHandler"; export declare class WebSocketServer { protected logger: ILogger; protected randomUtil: RandomUtil; - protected configServer: ConfigServer; - protected localisationService: LocalisationService; protected jsonUtil: JsonUtil; + protected localisationService: LocalisationService; protected httpServerHelper: HttpServerHelper; - protected profileHelper: ProfileHelper; - constructor(logger: ILogger, randomUtil: RandomUtil, configServer: ConfigServer, localisationService: LocalisationService, jsonUtil: JsonUtil, httpServerHelper: HttpServerHelper, profileHelper: ProfileHelper); - protected httpConfig: IHttpConfig; - protected defaultNotification: INotification; - protected webSocketServer: WebSocket.Server; - protected webSockets: Record; - protected websocketPingHandler: any; - getWebSocketServer(): WebSocket.Server; - getSessionWebSocket(sessionID: string): WebSocket.WebSocket; + protected webSocketConnectionHandlers: IWebSocketConnectionHandler[]; + protected webSocketServer: Server; + constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, httpServerHelper: HttpServerHelper, webSocketConnectionHandlers: IWebSocketConnectionHandler[]); + getWebSocketServer(): Server; setupWebSocket(httpServer: http.Server): void; - sendMessage(sessionID: string, output: INotification): void; protected getRandomisedMessage(): string; - isConnectionWebSocket(sessionID: string): boolean; - protected wsOnConnection(ws: WebSocket.WebSocket, req: IncomingMessage): void; + protected wsOnConnection(ws: WebSocket, req: IncomingMessage): void; } diff --git a/TypeScript/9RouterHooks/types/servers/http/AkiHttpListener.d.ts b/TypeScript/9RouterHooks/types/servers/http/AkiHttpListener.d.ts index 9499884..4ccdcf6 100644 --- a/TypeScript/9RouterHooks/types/servers/http/AkiHttpListener.d.ts +++ b/TypeScript/9RouterHooks/types/servers/http/AkiHttpListener.d.ts @@ -19,7 +19,7 @@ export declare class AkiHttpListener implements IHttpListener { constructor(httpRouter: HttpRouter, // TODO: delay required serializers: Serializer[], logger: ILogger, requestsLogger: ILogger, jsonUtil: JsonUtil, httpResponse: HttpResponseUtil, localisationService: LocalisationService); canHandle(_: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; /** * Send http response to the client * @param sessionID Player id @@ -29,7 +29,7 @@ export declare class AkiHttpListener implements IHttpListener { * @param output Server generated response data */ sendResponse(sessionID: string, req: IncomingMessage, resp: ServerResponse, body: Buffer, output: string): void; - getResponse(sessionID: string, req: IncomingMessage, body: Buffer): string; + getResponse(sessionID: string, req: IncomingMessage, body: Buffer): Promise; protected getBodyInfo(body: Buffer, requestUrl?: any): any; sendJson(resp: ServerResponse, output: string, sessionID: string): void; sendZlibJson(resp: ServerResponse, output: string, sessionID: string): void; diff --git a/TypeScript/9RouterHooks/types/servers/http/IHttpListener.d.ts b/TypeScript/9RouterHooks/types/servers/http/IHttpListener.d.ts index 29d5fce..ff148d6 100644 --- a/TypeScript/9RouterHooks/types/servers/http/IHttpListener.d.ts +++ b/TypeScript/9RouterHooks/types/servers/http/IHttpListener.d.ts @@ -2,5 +2,5 @@ import { IncomingMessage, ServerResponse } from "node:http"; export interface IHttpListener { canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/9RouterHooks/types/servers/ws/AkiWebSocketConnectionHandler.d.ts b/TypeScript/9RouterHooks/types/servers/ws/AkiWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..b0b354a --- /dev/null +++ b/TypeScript/9RouterHooks/types/servers/ws/AkiWebSocketConnectionHandler.d.ts @@ -0,0 +1,31 @@ +/// +import { IncomingMessage } from "http"; +import { WebSocket } from "ws"; +import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; +import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { ConfigServer } from "@spt-aki/servers/ConfigServer"; +import { IWebSocketConnectionHandler } from "@spt-aki/servers/ws/IWebSocketConnectionHandler"; +import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { IAkiWebSocketMessageHandler } from "./message/IAkiWebSocketMessageHandler"; +export declare class AkiWebSocketConnectionHandler implements IWebSocketConnectionHandler { + protected logger: ILogger; + protected profileHelper: ProfileHelper; + protected localisationService: LocalisationService; + protected configServer: ConfigServer; + protected jsonUtil: JsonUtil; + protected akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]; + protected httpConfig: IHttpConfig; + protected webSockets: Map; + protected defaultNotification: IWsNotificationEvent; + protected websocketPingHandler: any; + constructor(logger: ILogger, profileHelper: ProfileHelper, localisationService: LocalisationService, configServer: ConfigServer, jsonUtil: JsonUtil, akiWebSocketMessageHandlers: IAkiWebSocketMessageHandler[]); + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; + sendMessage(sessionID: string, output: IWsNotificationEvent): void; + isConnectionWebSocket(sessionID: string): boolean; + getSessionWebSocket(sessionID: string): WebSocket; +} diff --git a/TypeScript/9RouterHooks/types/servers/ws/IWebSocketConnectionHandler.d.ts b/TypeScript/9RouterHooks/types/servers/ws/IWebSocketConnectionHandler.d.ts new file mode 100644 index 0000000..920dad4 --- /dev/null +++ b/TypeScript/9RouterHooks/types/servers/ws/IWebSocketConnectionHandler.d.ts @@ -0,0 +1,8 @@ +/// +import { IncomingMessage } from "node:http"; +import { WebSocket } from "ws"; +export interface IWebSocketConnectionHandler { + getSocketId(): string; + getHookUrl(): string; + onConnection(ws: WebSocket, req: IncomingMessage): void; +} diff --git a/TypeScript/9RouterHooks/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts b/TypeScript/9RouterHooks/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..f708e49 --- /dev/null +++ b/TypeScript/9RouterHooks/types/servers/ws/message/DefaultAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,8 @@ +import { RawData, WebSocket } from "ws"; +import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; +import { IAkiWebSocketMessageHandler } from "@spt-aki/servers/ws/message/IAkiWebSocketMessageHandler"; +export declare class DefaultAkiWebSocketMessageHandler implements IAkiWebSocketMessageHandler { + protected logger: ILogger; + constructor(logger: ILogger); + onAkiMessage(sessionId: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/9RouterHooks/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts b/TypeScript/9RouterHooks/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts new file mode 100644 index 0000000..ea2de1e --- /dev/null +++ b/TypeScript/9RouterHooks/types/servers/ws/message/IAkiWebSocketMessageHandler.d.ts @@ -0,0 +1,4 @@ +import { RawData, WebSocket } from "ws"; +export interface IAkiWebSocketMessageHandler { + onAkiMessage(sessionID: string, client: WebSocket, message: RawData): void; +} diff --git a/TypeScript/9RouterHooks/types/services/BotGenerationCacheService.d.ts b/TypeScript/9RouterHooks/types/services/BotGenerationCacheService.d.ts index e2c0a35..4c2ce9c 100644 --- a/TypeScript/9RouterHooks/types/services/BotGenerationCacheService.d.ts +++ b/TypeScript/9RouterHooks/types/services/BotGenerationCacheService.d.ts @@ -2,17 +2,15 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { IBotBase } from "@spt-aki/models/eft/common/tables/IBotBase"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class BotGenerationCacheService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected localisationService: LocalisationService; protected botHelper: BotHelper; protected storedBots: Map; protected activeBotsInRaid: IBotBase[]; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, localisationService: LocalisationService, botHelper: BotHelper); + constructor(logger: ILogger, randomUtil: RandomUtil, localisationService: LocalisationService, botHelper: BotHelper); /** * Store array of bots in cache, shuffle results before storage * @param botsToStore Bots we want to store in the cache diff --git a/TypeScript/9RouterHooks/types/services/BotLootCacheService.d.ts b/TypeScript/9RouterHooks/types/services/BotLootCacheService.d.ts index 7f79bfe..7b56a12 100644 --- a/TypeScript/9RouterHooks/types/services/BotLootCacheService.d.ts +++ b/TypeScript/9RouterHooks/types/services/BotLootCacheService.d.ts @@ -7,17 +7,17 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { RagfairPriceService } from "@spt-aki/services/RagfairPriceService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class BotLootCacheService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected itemHelper: ItemHelper; protected databaseServer: DatabaseServer; protected pmcLootGenerator: PMCLootGenerator; protected localisationService: LocalisationService; protected ragfairPriceService: RagfairPriceService; + protected cloner: ICloner; protected lootCache: Record; - constructor(logger: ILogger, jsonUtil: JsonUtil, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService); + constructor(logger: ILogger, itemHelper: ItemHelper, databaseServer: DatabaseServer, pmcLootGenerator: PMCLootGenerator, localisationService: LocalisationService, ragfairPriceService: RagfairPriceService, cloner: ICloner); /** * Remove cached bot loot data */ diff --git a/TypeScript/9RouterHooks/types/services/CustomLocationWaveService.d.ts b/TypeScript/9RouterHooks/types/services/CustomLocationWaveService.d.ts index f32c082..8232364 100644 --- a/TypeScript/9RouterHooks/types/services/CustomLocationWaveService.d.ts +++ b/TypeScript/9RouterHooks/types/services/CustomLocationWaveService.d.ts @@ -3,16 +3,14 @@ import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; export declare class CustomLocationWaveService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, configServer: ConfigServer); /** * Add a boss wave to a map * @param locationId e.g. factory4_day, bigmap diff --git a/TypeScript/9RouterHooks/types/services/FenceService.d.ts b/TypeScript/9RouterHooks/types/services/FenceService.d.ts index 75c4b28..b0fa697 100644 --- a/TypeScript/9RouterHooks/types/services/FenceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/FenceService.d.ts @@ -13,7 +13,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; /** @@ -22,7 +22,6 @@ import { TimeUtil } from "@spt-aki/utils/TimeUtil"; */ export declare class FenceService { protected logger: ILogger; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected randomUtil: RandomUtil; protected databaseServer: DatabaseServer; @@ -31,6 +30,7 @@ export declare class FenceService { protected presetHelper: PresetHelper; protected localisationService: LocalisationService; protected configServer: ConfigServer; + protected cloner: ICloner; protected traderConfig: ITraderConfig; /** Time when some items in assort will be replaced */ protected nextPartialRefreshTimestamp: number; @@ -41,7 +41,7 @@ export declare class FenceService { /** Desired baseline counts - Hydrated on initial assort generation as part of generateFenceAssorts() */ protected desiredAssortCounts: IFenceAssortGenerationValues; protected fenceItemUpdCompareProperties: Set; - constructor(logger: ILogger, jsonUtil: JsonUtil, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, timeUtil: TimeUtil, randomUtil: RandomUtil, databaseServer: DatabaseServer, handbookHelper: HandbookHelper, itemHelper: ItemHelper, presetHelper: PresetHelper, localisationService: LocalisationService, configServer: ConfigServer, cloner: ICloner); /** * Replace main fence assort with new assort * @param assort New assorts to replace old with diff --git a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts index 7148969..b024e4d 100644 --- a/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts +++ b/TypeScript/9RouterHooks/types/services/InsuranceService.d.ts @@ -18,8 +18,8 @@ import { SaveServer } from "@spt-aki/servers/SaveServer"; import { LocaleService } from "@spt-aki/services/LocaleService"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; import { MailSendService } from "@spt-aki/services/MailSendService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; export declare class InsuranceService { @@ -29,7 +29,6 @@ export declare class InsuranceService { protected randomUtil: RandomUtil; protected itemHelper: ItemHelper; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected timeUtil: TimeUtil; protected saveServer: SaveServer; protected traderHelper: TraderHelper; @@ -39,10 +38,11 @@ export declare class InsuranceService { protected localeService: LocaleService; protected mailSendService: MailSendService; protected configServer: ConfigServer; + protected cloner: ICloner; protected insured: Record>; protected insuranceConfig: IInsuranceConfig; protected lostOnDeathConfig: ILostOnDeathConfig; - constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, jsonUtil: JsonUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer); + constructor(logger: ILogger, databaseServer: DatabaseServer, secureContainerHelper: SecureContainerHelper, randomUtil: RandomUtil, itemHelper: ItemHelper, hashUtil: HashUtil, timeUtil: TimeUtil, saveServer: SaveServer, traderHelper: TraderHelper, dialogueHelper: DialogueHelper, handbookHelper: HandbookHelper, localisationService: LocalisationService, localeService: LocaleService, mailSendService: MailSendService, configServer: ConfigServer, cloner: ICloner); /** * Does player have insurance array * @param sessionId Player id diff --git a/TypeScript/9RouterHooks/types/services/LocaleService.d.ts b/TypeScript/9RouterHooks/types/services/LocaleService.d.ts index 023e61d..d51859d 100644 --- a/TypeScript/9RouterHooks/types/services/LocaleService.d.ts +++ b/TypeScript/9RouterHooks/types/services/LocaleService.d.ts @@ -50,4 +50,9 @@ export declare class LocaleService { * @returns langage part of locale e.g. 'en' part of 'en-US' */ protected getPlatformForClientLocale(): string; + /** + * This is in a function so we can overwrite it during testing + * @returns The current platform locale + */ + protected getPlatformLocale(): Intl.Locale; } diff --git a/TypeScript/9RouterHooks/types/services/NotificationService.d.ts b/TypeScript/9RouterHooks/types/services/NotificationService.d.ts index 3f25b10..81cc13d 100644 --- a/TypeScript/9RouterHooks/types/services/NotificationService.d.ts +++ b/TypeScript/9RouterHooks/types/services/NotificationService.d.ts @@ -1,4 +1,4 @@ -import { INotification } from "@spt-aki/models/eft/notifier/INotifier"; +import { IWsNotificationEvent } from "@spt-aki/models/eft/ws/IWsNotificationEvent"; export declare class NotificationService { protected messageQueue: Record; getMessageQueue(): Record; @@ -12,7 +12,7 @@ export declare class NotificationService { /** * Add message to queue */ - add(sessionID: string, message: INotification): void; + add(sessionID: string, message: IWsNotificationEvent): void; /** * Get message queue for session * @param sessionID diff --git a/TypeScript/9RouterHooks/types/services/OpenZoneService.d.ts b/TypeScript/9RouterHooks/types/services/OpenZoneService.d.ts index 581975b..d423a14 100644 --- a/TypeScript/9RouterHooks/types/services/OpenZoneService.d.ts +++ b/TypeScript/9RouterHooks/types/services/OpenZoneService.d.ts @@ -3,18 +3,16 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { RandomUtil } from "@spt-aki/utils/RandomUtil"; /** Service for adding new zones to a maps OpenZones property */ export declare class OpenZoneService { protected logger: ILogger; protected randomUtil: RandomUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected localisationService: LocalisationService; protected configServer: ConfigServer; protected locationConfig: ILocationConfig; - constructor(logger: ILogger, randomUtil: RandomUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); + constructor(logger: ILogger, randomUtil: RandomUtil, databaseServer: DatabaseServer, localisationService: LocalisationService, configServer: ConfigServer); /** * Add open zone to specified map * @param locationId map location (e.g. factory4_day) diff --git a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts index 1045d0a..26425ae 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileFixerService.d.ts @@ -16,6 +16,7 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { ConfigServer } from "@spt-aki/servers/ConfigServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { LocalisationService } from "@spt-aki/services/LocalisationService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; import { JsonUtil } from "@spt-aki/utils/JsonUtil"; import { TimeUtil } from "@spt-aki/utils/TimeUtil"; @@ -34,9 +35,10 @@ export declare class ProfileFixerService { protected hashUtil: HashUtil; protected databaseServer: DatabaseServer; protected configServer: ConfigServer; + protected cloner: ICloner; protected coreConfig: ICoreConfig; protected ragfairConfig: IRagfairConfig; - constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer); + constructor(logger: ILogger, watermark: Watermark, hideoutHelper: HideoutHelper, inventoryHelper: InventoryHelper, traderHelper: TraderHelper, profileHelper: ProfileHelper, itemHelper: ItemHelper, localisationService: LocalisationService, timeUtil: TimeUtil, jsonUtil: JsonUtil, hashUtil: HashUtil, databaseServer: DatabaseServer, configServer: ConfigServer, cloner: ICloner); /** * Find issues in the pmc profile data that may cause issues and fix them * @param pmcProfile profile to check and fix diff --git a/TypeScript/9RouterHooks/types/services/ProfileSnapshotService.d.ts b/TypeScript/9RouterHooks/types/services/ProfileSnapshotService.d.ts index 3f60d41..652bc92 100644 --- a/TypeScript/9RouterHooks/types/services/ProfileSnapshotService.d.ts +++ b/TypeScript/9RouterHooks/types/services/ProfileSnapshotService.d.ts @@ -1,9 +1,9 @@ import { IAkiProfile } from "@spt-aki/models/eft/profile/IAkiProfile"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class ProfileSnapshotService { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected storedProfileSnapshots: Record; - constructor(jsonUtil: JsonUtil); + constructor(cloner: ICloner); /** * Store a profile into an in-memory object * @param sessionID session id - acts as the key diff --git a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts index 4c51bab..ecb34fa 100644 --- a/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts +++ b/TypeScript/9RouterHooks/types/services/SeasonalEventService.d.ts @@ -2,6 +2,7 @@ import { BotHelper } from "@spt-aki/helpers/BotHelper"; import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { IConfig } from "@spt-aki/models/eft/common/IGlobals"; import { Inventory } from "@spt-aki/models/eft/common/tables/IBotType"; +import { Season } from "@spt-aki/models/enums/Season"; import { SeasonalEventType } from "@spt-aki/models/enums/SeasonalEventType"; import { IHttpConfig } from "@spt-aki/models/spt/config/IHttpConfig"; import { IQuestConfig } from "@spt-aki/models/spt/config/IQuestConfig"; @@ -102,6 +103,7 @@ export declare class SeasonalEventService { */ enableSeasonalEvents(sessionId: string): void; protected cacheActiveEvents(): void; + getActiveWeatherSeason(): Season; /** * Iterate through bots inventory and loot to find and remove christmas items (as defined in SeasonalEventService) * @param botInventory Bots inventory to iterate over diff --git a/TypeScript/9RouterHooks/types/services/TraderServicesService.d.ts b/TypeScript/9RouterHooks/types/services/TraderServicesService.d.ts index 4533989..cfad219 100644 --- a/TypeScript/9RouterHooks/types/services/TraderServicesService.d.ts +++ b/TypeScript/9RouterHooks/types/services/TraderServicesService.d.ts @@ -2,12 +2,12 @@ import { ProfileHelper } from "@spt-aki/helpers/ProfileHelper"; import { ITraderServiceModel } from "@spt-aki/models/spt/services/ITraderServiceModel"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; export declare class TraderServicesService { protected profileHelper: ProfileHelper; - protected jsonUtil: JsonUtil; protected logger: ILogger; protected databaseServer: DatabaseServer; - constructor(profileHelper: ProfileHelper, jsonUtil: JsonUtil, logger: ILogger, databaseServer: DatabaseServer); + protected cloner: ICloner; + constructor(profileHelper: ProfileHelper, logger: ILogger, databaseServer: DatabaseServer, cloner: ICloner); getTraderServices(sessionId: string, traderId: string): ITraderServiceModel[]; } diff --git a/TypeScript/9RouterHooks/types/services/mod/CustomItemService.d.ts b/TypeScript/9RouterHooks/types/services/mod/CustomItemService.d.ts index fe9c16c..8af560d 100644 --- a/TypeScript/9RouterHooks/types/services/mod/CustomItemService.d.ts +++ b/TypeScript/9RouterHooks/types/services/mod/CustomItemService.d.ts @@ -5,17 +5,17 @@ import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { ItemBaseClassService } from "@spt-aki/services/ItemBaseClassService"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { HashUtil } from "@spt-aki/utils/HashUtil"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; export declare class CustomItemService { protected logger: ILogger; protected hashUtil: HashUtil; - protected jsonUtil: JsonUtil; protected databaseServer: DatabaseServer; protected itemHelper: ItemHelper; protected itemBaseClassService: ItemBaseClassService; + protected cloner: ICloner; protected tables: IDatabaseTables; - constructor(logger: ILogger, hashUtil: HashUtil, jsonUtil: JsonUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService); + constructor(logger: ILogger, hashUtil: HashUtil, databaseServer: DatabaseServer, itemHelper: ItemHelper, itemBaseClassService: ItemBaseClassService, cloner: ICloner); /** * Create a new item from a cloned item base * WARNING - If no item id is supplied, an id will be generated, this id will be random every time you add an item and will not be the same on each subsequent server start diff --git a/TypeScript/9RouterHooks/types/services/mod/httpListener/HttpListenerMod.d.ts b/TypeScript/9RouterHooks/types/services/mod/httpListener/HttpListenerMod.d.ts index ebfa946..723b78d 100644 --- a/TypeScript/9RouterHooks/types/services/mod/httpListener/HttpListenerMod.d.ts +++ b/TypeScript/9RouterHooks/types/services/mod/httpListener/HttpListenerMod.d.ts @@ -6,5 +6,5 @@ export declare class HttpListenerMod implements IHttpListener { private handleOverride; constructor(canHandleOverride: (sessionId: string, req: IncomingMessage) => boolean, handleOverride: (sessionId: string, req: IncomingMessage, resp: ServerResponse) => void); canHandle(sessionId: string, req: IncomingMessage): boolean; - handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): void; + handle(sessionId: string, req: IncomingMessage, resp: ServerResponse): Promise; } diff --git a/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts b/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts index befc3cb..091aba2 100644 --- a/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/JsonUtil.d.ts @@ -72,6 +72,7 @@ export declare class JsonUtil { * Convert into string and back into object to clone object * @param objectToClone Item to clone * @returns Cloned parameter + * @deprecated Use ICloner implementations, such as RecursiveCloner or StructuredCloner */ clone(objectToClone: T): T; } diff --git a/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts b/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts index 9236773..39fe482 100644 --- a/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts +++ b/TypeScript/9RouterHooks/types/utils/RandomUtil.d.ts @@ -1,5 +1,5 @@ import { ILogger } from "@spt-aki/models/spt/utils/ILogger"; -import { JsonUtil } from "@spt-aki/utils/JsonUtil"; +import { ICloner } from "@spt-aki/utils/cloners/ICloner"; import { MathUtil } from "@spt-aki/utils/MathUtil"; /** * Array of ProbabilityObjectArray which allow to randomly draw of the contained objects @@ -18,8 +18,8 @@ import { MathUtil } from "@spt-aki/utils/MathUtil"; */ export declare class ProbabilityObjectArray extends Array> { private mathUtil; - private jsonUtil; - constructor(mathUtil: MathUtil, jsonUtil: JsonUtil, ...items: ProbabilityObject[]); + private cloner; + constructor(mathUtil: MathUtil, cloner: ICloner, ...items: ProbabilityObject[]); filter(callbackfn: (value: ProbabilityObject, index: number, array: ProbabilityObject[]) => any): ProbabilityObjectArray; /** * Calculates the normalized cumulative probability of the ProbabilityObjectArray's elements normalized to 1 @@ -103,9 +103,9 @@ export declare class ProbabilityObject { constructor(key: K, relativeProbability: number, data?: V); } export declare class RandomUtil { - protected jsonUtil: JsonUtil; + protected cloner: ICloner; protected logger: ILogger; - constructor(jsonUtil: JsonUtil, logger: ILogger); + constructor(cloner: ICloner, logger: ILogger); getInt(min: number, max: number): number; getIntEx(max: number): number; getFloat(min: number, max: number): number; diff --git a/TypeScript/9RouterHooks/types/utils/cloners/ICloner.d.ts b/TypeScript/9RouterHooks/types/utils/cloners/ICloner.d.ts new file mode 100644 index 0000000..77c0541 --- /dev/null +++ b/TypeScript/9RouterHooks/types/utils/cloners/ICloner.d.ts @@ -0,0 +1,3 @@ +export interface ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/9RouterHooks/types/utils/cloners/JsonCloner.d.ts b/TypeScript/9RouterHooks/types/utils/cloners/JsonCloner.d.ts new file mode 100644 index 0000000..2353d90 --- /dev/null +++ b/TypeScript/9RouterHooks/types/utils/cloners/JsonCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class JsonCloner implements ICloner { + clone(obj: T): T; +} diff --git a/TypeScript/9RouterHooks/types/utils/cloners/RecursiveCloner.d.ts b/TypeScript/9RouterHooks/types/utils/cloners/RecursiveCloner.d.ts new file mode 100644 index 0000000..e38fbe5 --- /dev/null +++ b/TypeScript/9RouterHooks/types/utils/cloners/RecursiveCloner.d.ts @@ -0,0 +1,5 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class RecursiveCloner implements ICloner { + private static primitives; + clone(obj: T): T; +} diff --git a/TypeScript/9RouterHooks/types/utils/cloners/StructuredCloner.d.ts b/TypeScript/9RouterHooks/types/utils/cloners/StructuredCloner.d.ts new file mode 100644 index 0000000..789cb6d --- /dev/null +++ b/TypeScript/9RouterHooks/types/utils/cloners/StructuredCloner.d.ts @@ -0,0 +1,4 @@ +import type { ICloner } from "@spt-aki/utils/cloners/ICloner"; +export declare class StructuredCloner implements ICloner { + clone(obj: T): T; +}